/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modulos.consulta.oftalmologia.vista;

import basedatos.*;
import java.awt.event.ActionEvent;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import modelo.NumeroLetra;
import modelo.Persona;
import modulos.certificado.vista.iFrmCertificadoMedico;
import modulos.consulta.modelo.*;
import modulos.consulta.oftalmologia.modelo.ConsultaOftalmologia;
import modulos.consulta.oftalmologia.modelo.EvolucionOftalmologia;
import modulos.consulta.oftalmologia.modelo.ProcedimientoEspecial;
import modulos.consulta.oftalmologia.modelo.RecetaOftalmologia;
import modulos.consulta.vista.*;
import modulos.enfymed.modelo.MedicamentoComercial;
import modulos.enfymed.modelo.Patologia;
import modulos.paciente.modelo.Paciente;
import modulos.reservacion.vista.iFrmReservaCita;
import modulos.usuario.modelo.Usuario;
import vista.frmPrincipal;
import vista.modelo.Calendario;
import vista.modelo.Mensaje;
import vista.modelo.OperacionesVarias;

/**
 *
 * @author Edulima
 */
public class IFrmHCGeneralOftalmologia extends javax.swing.JInternalFrame {

    /**
     * Creates new form IFrmHCGeneral
     */
    private Usuario usuario = new Usuario();
    private Paciente paciente = new Paciente();
    private modulos.consulta.oftalmologia.modelo.ConsultaOftalmologia consultaOftalmologia = new ConsultaOftalmologia();
    private EvolucionOftalmologia evolucionOftalmologia = new EvolucionOftalmologia();
    private ArrayList<Object> listConsultas = new ArrayList<Object>();
    private ArrayList<Object> listEvoluciones = new ArrayList<Object>();
    private ArrayList<Object> listMedicamentos = new ArrayList<Object>();
    private ArrayList<Object> listPatologias = new ArrayList<Object>();
    private static ArrayList<Object> listMotivoConsultas = new ArrayList<Object>();
    private DefaultTableModel modelotblConsultas = new DefaultTableModel();
    private DefaultTableModel modelotblEvoluciones = new DefaultTableModel();
    private ArrayList<pnlDiagnostico> pnlsDiagnosticos = new ArrayList<pnlDiagnostico>();
    private List<ProcedimientoEspecial> listaProcedimientoEspecial = new ArrayList<ProcedimientoEspecial>();
    private DefaultTableModel modelotblProcedimientoEspecial = new DefaultTableModel();
    //consultas otros especialistas
    private DefaultTableModel modelotblConsultasVisualizar = new DefaultTableModel();
    private DefaultTableModel modelotblEvolucionesVisualizar = new DefaultTableModel();
    private ArrayList<ConsultaVisualizar> listConsultasVisualizar = new ArrayList<ConsultaVisualizar>();
    private ArrayList<Evolucion> listEvolucionesVisualizar = new ArrayList<Evolucion>();
    private ConsultaVisualizar consultaVisualizar = new ConsultaVisualizar();
    //Declaracion de Constantes
    public static final int NEW_CONSULTA = 0;
    public static final int VIEW_CONSULTA = 1;
    public static final int NEW_EVOLUCION = 2;
    public static final int VIEW_EVOLUCION = 3;
    public static final int NULO = -1;
    private int estadoForm;

    //g
    public IFrmHCGeneralOftalmologia() {
        initComponents();
        usuario = (Usuario) frmPrincipal.UsuarioLogueado.get(0)[1];
        listConsultas = (ArrayList<Object>) ConsultaBD.listarConsultas(paciente, usuario);

        OperacionesVarias.centrar(this);
    }

    public IFrmHCGeneralOftalmologia(Paciente paciente) {
        initComponents();
        usuario = (Usuario) frmPrincipal.UsuarioLogueado.get(0)[1];
        listConsultas = (ArrayList<Object>) ConsultaBD.listarConsultas(paciente, usuario);

        modelotblConsultas.addColumn("Nro");
        modelotblConsultas.addColumn("Motivo Consulta");
        modelotblConsultas.addColumn("Fecha");
        modelotblEvoluciones.addColumn("Nro");
        modelotblEvoluciones.addColumn("Evolucion");
        modelotblEvoluciones.addColumn("Fecha");
        modelotblConsultasVisualizar.addColumn("Nro");
        modelotblConsultasVisualizar.addColumn("Especialista");
        modelotblConsultasVisualizar.addColumn("Motivo Consulta");
        modelotblConsultasVisualizar.addColumn("Fecha");
        modelotblEvolucionesVisualizar.addColumn("Nro");
        modelotblEvolucionesVisualizar.addColumn("Evolucion");
        modelotblEvolucionesVisualizar.addColumn("Fecha");
        modelotblProcedimientoEspecial.addColumn("Nro");
        modelotblProcedimientoEspecial.addColumn("Fecha");

        listarMedicamentos();
        listarPatologias();
        listarMotivoConsultas();
        tpnlPaneles.removeAll();
        this.paciente = paciente;
        setPaciente(paciente);
        btnCerrarConsulta.setVisible(false);
        OperacionesVarias.centrar(this);
        pnlDiagnostico pnlD = new pnlDiagnostico();
        pnlDiagnosticos.add(pnlD);
        pnlsDiagnosticos.add(pnlD);
        setEstadoForm(IFrmHCGeneralOftalmologia.NULO);
    }

    private void agregarPaneles() {
        tpnlPaneles.removeAll();
        tpnlPaneles.add(pnlAnamnesis);
//        tpnlPaneles.add(pnlExamenFisico);
        tpnlPaneles.add(pnlRefraccion);
        tpnlPaneles.add(pnlSegmentoAnterior);
        tpnlPaneles.add(pnlSegmentoPosterior);
        tpnlPaneles.add(pnlDiagReceta);
        tpnlPaneles.setTitleAt(0, "Anamnesis");
        tpnlPaneles.setTitleAt(1, "Refraccion");
        tpnlPaneles.setTitleAt(2, "Segmento Anterior");
        tpnlPaneles.setTitleAt(3, "Segmento Posterior");
        tpnlPaneles.setTitleAt(4, "Diagnostico/Receta");
    }

    private void setPaciente(Paciente p) {
        txtNomPacient.setText(p.getNombre() + " " + p.getApellido());
        txtEdadPacient.setText(Persona.calcularAnos(p.getFechaNace()));
        txtNumHC.setText(p.getNumeroHC());

        cargarConsultas();
        tblConsultas.getColumnModel().getColumn(0).setPreferredWidth(15);
        tblConsultas.getColumnModel().getColumn(1).setPreferredWidth(220);
        tblConsultas.getColumnModel().getColumn(2).setPreferredWidth(120);
        tblConsultas.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);

        tblEvoluciones.getColumnModel().getColumn(0).setPreferredWidth(15);
        tblEvoluciones.getColumnModel().getColumn(1).setPreferredWidth(220);
        tblEvoluciones.getColumnModel().getColumn(2).setPreferredWidth(120);
        tblEvoluciones.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
        tpnlPaneles.add(pnlConsultas);
        tpnlPaneles.setTitleAt(0, "Listado de Consultas");

    }

    private void newConsulta() {
        consultaOftalmologia = new ConsultaOftalmologia();
        txtAntecedentFami.setText("");
        txtAntecedentPerson.setText("");
        txtEnfermedadActual.setText("");
        txtMotivoConsulta.setText("");
        txtOculares.setText("");
        int num = (listConsultas.size() + 1);
        txtNumConsulta.setText("" + num);
        consultaOftalmologia.setNumConsul(num);
        GregorianCalendar c = new GregorianCalendar();
        String dia = Calendario.diasCalendario[c.get(GregorianCalendar.DAY_OF_WEEK) - 1];
        txtFecha.setText(dia + ", " + OperacionesVarias.fechaString(c.getTime()));
        txtHora.setText(c.get(GregorianCalendar.HOUR) + ":" + c.get(GregorianCalendar.MINUTE) + ":" + c.get(GregorianCalendar.SECOND));
        consultaOftalmologia.setFechaCreacion(c.getTime());
        txtAnexoDR.setText("");
        txtIndicacionDR.setText("");
        txtMedicamentosDR.setText("");
        pnlDiagnosticos.removeAll();
        pnlsDiagnosticos = new ArrayList<pnlDiagnostico>();
        pnlsDiagnosticos.add(new pnlDiagnostico());
        pnlDiagnosticos.add(pnlsDiagnosticos.get(pnlsDiagnosticos.size() - 1));
        btnCerrarConsulta.setVisible(true);
        btnNewEvolucion.setEnabled(false);
        btnNewConsulta.setEnabled(false);

        //Segmento Anterior
        motilidadOcularOD.setText("Normal");
        motilidadOcularOI.setText("Normal");
        tonometriaOD.setText("");
        tonometriaOI.setText("");
        parpadosPestanasOD.setText("Normal");
        parpadosPestanasOI.setText("Normal");
        viasLacrimalesOD.setText("Normal");
        viasLacrimalesOI.setText("Normal");
        conjuntivaOD.setText("Normal");
        conjuntivaOI.setText("Normal");
        corneaOD.setText("Normal");
        corneaOI.setText("Normal");
        camaraAnteriorOD.setText("Normal");
        camaraAnteriorOI.setText("Normal");
        pupilaOD.setText("Normal");
        pupilaOI.setText("Normal");
        irisOD.setText("Normal");
        irisOI.setText("Normal");
        anguloIridoCornealOD.setText("Normal");
        anguloIridoCornealOI.setText("Normal");
        cristalinoOD.setText("Normal");
        cristalinoOI.setText("Normal");

        //Segmento Posterior
        listaProcedimientoEspecial = new ArrayList<ProcedimientoEspecial>();
        txtVitreoOD.setText("Normal");
        txtVitreoOI.setText("Normal");
        txtDiscoOpticoOD.setText("Normal");
        txtDiscoOpticoOI.setText("Normal");
        txtMaculaOD.setText("Normal");
        txtMaculaOI.setText("Normal");
        txtVasosOD.setText("Normal");
        txtVasosOI.setText("Normal");
        txtRetinaPerifericaOD.setText("Normal");
        txtRetinaPerifericaOI.setText("Normal");

        txtCamposVisualesOD.setText("");
        txtCamposVisualesOI.setText("");
        txtTonometriaFecha.setText("");
        txtTonometriaHora.setText("");
        txtTonometriaOD.setText("");
        txtTonometriaOI.setText("");

        setEstadoForm(IFrmHCGeneralOftalmologia.NEW_CONSULTA);
        setEditable(true);
    }

    private void newEvolucion() {
        evolucionOftalmologia = new EvolucionOftalmologia();
        evolucionOftalmologia.setNumEvolucion(listEvoluciones.size() + 1);
        GregorianCalendar c = new GregorianCalendar();
        String dia = Calendario.diasCalendario[c.get(GregorianCalendar.DAY_OF_WEEK) - 1];
        txtFechaEvolucion.setText(dia + ", " + OperacionesVarias.fechaString(c.getTime()));
        txtHoraEvolucion.setText(c.get(GregorianCalendar.HOUR) + ":" + c.get(GregorianCalendar.MINUTE) + ":" + c.get(GregorianCalendar.SECOND));
        evolucionOftalmologia.setFechaCreacion(c.getTime());
        setEstadoForm(IFrmHCGeneralOftalmologia.NEW_EVOLUCION);
        txtEvolucion.setText("");
        txtMedicamentosE.setText("");
        txtIndicacionesE.setText("");
        setEditableEvolucion(true);
        tpnlPaneles.add(pnlEvolucion);
        tpnlPaneles.add(pnlEvolucion1);
        tpnlPaneles.setTitleAt(tpnlPaneles.getTabCount() - 2, "Evolucion");
        tpnlPaneles.setTitleAt(tpnlPaneles.getTabCount() - 1, "Evolucion 1");
        tpnlPaneles.setSelectedIndex(tpnlPaneles.getTabCount() - 2);

        //Evolucion 2

        txtEVisionLejanaSCOD.setText("");
        txtEVisionLejanaSCOI.setText("");
        txtEVisionLejanaCCOD.setText("");
        txtEVisionLejanaCCOI.setText("");
        txtEVisionLejanaOD.setText("");
        txtEVisionLejanaOI.setText("");
        txtEVisionCercanaSCOD.setText("");
        txtEVisionCercanaSCOI.setText("");
        txtEVisionCercanaCCOD.setText("");
        txtEVisionCercanaCCOI.setText("");
        cmbEVisionCercanaSCJ.setSelectedIndex(-1);
        cmbEVisionCercanaCCJ.setSelectedIndex(-1);
        txtETonometriaFecha.setText("");
        txtETonometriaHora.setText("");
        txtETonometriaOD.setText("");
        txtETonometriaOI.setText("");
        txtEDistanciaESFOD.setText("");
        txtEDistanciaESFOI.setText("");
        txtEDistanciaCILOD.setText("");
        txtEDistanciaCILOI.setText("");
        txtEDistanciaEJEOD.setText("");
        txtEDistanciaEJEOI.setText("");
        txtEDistanciaPRISMAOD.setText("");
        txtEDistanciaPRISMAOI.setText("");
        txtEDistanciaDIOD.setText("");
        txtEDistanciaDIOI.setText("");
        txtEDistanciaDNPOD.setText("");
        txtEDistanciaDNPOI.setText("");
        txtAdicionOD.setText("");
        txtAdicionOI.setText("");
        txtELecturaESFOD.setText("");
        txtELecturaESFOI.setText("");
        txtELecturaCILOD.setText("");
        txtELecturaCILOI.setText("");
        txtELecturaEJEOD.setText("");
        txtELecturaEJEOI.setText("");
        txtELecturaPRISMAOD.setText("");
        txtELecturaPRISMAOI.setText("");
        txtELecturaDIOD.setText("");
        txtELecturaDIOI.setText("");
        txtELecturaDNPOD.setText("");
        txtELecturaDNPOI.setText("");

    }

    private ConsultaOftalmologia getConsulta(ConsultaOftalmologia consultaOftalmologia) {
        consultaOftalmologia.setAntecedent_Fami(txtAntecedentFami.getText());
        consultaOftalmologia.setAntecedent_Person(txtAntecedentPerson.getText());
        consultaOftalmologia.setEnfermedadActual(txtEnfermedadActual.getText());
        consultaOftalmologia.setOculares(txtOculares.getText());

        //Datos Diagnostico y Receta
        consultaOftalmologia.getRecetaMedica().setMedicamentos(txtMedicamentosDR.getText());
        consultaOftalmologia.getRecetaMedica().setIndicaciones(txtIndicacionDR.getText());
        consultaOftalmologia.getDiagnosticos().clear();
        for (pnlDiagnostico panel : pnlsDiagnosticos) {
            Diagnostico diag = new Diagnostico();
            diag.setDiagnostico(panel.getDiagnostico());
            diag.setTipo(panel.getSeleccion());
            diag.setIdDiagnostico(panel.getIdDiagnostico());
            consultaOftalmologia.getDiagnosticos().add(diag);
        }
        consultaOftalmologia.setAnexos(txtAnexoDR.getText());

        //Datos Examen Fisico
//        consulta.getExamenFisico().settA(txtTa.getText());
//        consulta.getExamenFisico().setfC(txtFc.getText());
//        consulta.getExamenFisico().setfR(txtFr.getText());
//        consulta.getExamenFisico().setSat02(txtSat02.getText());
//        consulta.getExamenFisico().setLlenadocapilar(txtLlenadoCapilar.getText());
//        consulta.getExamenFisico().setGlicemia(txtGlicemia.getText());
//        consulta.getExamenFisico().setTemperatura(txtTemperatura.getText());
//        try {
//            consulta.getExamenFisico().setPeso(Double.parseDouble(txtPeso.getText()));
//            consulta.getExamenFisico().setTalla(Integer.parseInt(txtTalla.getText()));
//        } catch (NumberFormatException e) {
//        }
//        consulta.getExamenFisico().setBiotipoConst(cmbBiotipoConst.getSelectedItem().toString());
//        consulta.getExamenFisico().setPsicoexpresiva(txtPsicoexpresiva.getText());
//        consulta.getExamenFisico().setSomatoexpresiva(txtSomatoexpresiva.getText());
//        consulta.getExamenFisico().setEstadoNutricional(cmbEstadoNutri.getSelectedItem().toString());

        //Segmento Anterior
        consultaOftalmologia.getSegmentoAnterior().setMotilidadOcularOD(motilidadOcularOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setMotilidadOcularOI(motilidadOcularOI.getText());
        consultaOftalmologia.getSegmentoAnterior().setTonometriaOD(tonometriaOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setTonometriaOI(tonometriaOI.getText());
        consultaOftalmologia.getSegmentoAnterior().setParpadosPestanasOD(parpadosPestanasOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setParpadosPestanasOI(parpadosPestanasOI.getText());
        consultaOftalmologia.getSegmentoAnterior().setViasLacrimalesOD(viasLacrimalesOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setViasLacrimalesOI(viasLacrimalesOI.getName());
        consultaOftalmologia.getSegmentoAnterior().setConjuntivaOD(conjuntivaOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setConjuntivaOI(conjuntivaOI.getText());
        consultaOftalmologia.getSegmentoAnterior().setCorneaOD(corneaOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setCorneaOI(corneaOI.getText());
        consultaOftalmologia.getSegmentoAnterior().setCamaraAnteriorOD(camaraAnteriorOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setCamaraAnteriorOI(camaraAnteriorOI.getText());
        consultaOftalmologia.getSegmentoAnterior().setPupilaOD(pupilaOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setPupilaOI(pupilaOI.getText());
        consultaOftalmologia.getSegmentoAnterior().setIrisOD(irisOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setIrisOI(irisOI.getText());
        consultaOftalmologia.getSegmentoAnterior().setAnguloIridoCornealOD(anguloIridoCornealOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setAnguloIridoCornealOI(anguloIridoCornealOI.getText());
        consultaOftalmologia.getSegmentoAnterior().setCristalinoOD(cristalinoOD.getText());
        consultaOftalmologia.getSegmentoAnterior().setCristalinoOI(cristalinoOI.getText());

        //Segmento Posterior
        consultaOftalmologia.getSegmentoPosterior().setVitreoOD(txtVitreoOD.getText());
        consultaOftalmologia.getSegmentoPosterior().setVitreoOI(txtVitreoOI.getText());
        consultaOftalmologia.getSegmentoPosterior().setDiscoOpticoOD(txtDiscoOpticoOD.getText());
        consultaOftalmologia.getSegmentoPosterior().setDiscoOpticoOI(txtDiscoOpticoOI.getText());
        consultaOftalmologia.getSegmentoPosterior().setMasculaOD(txtMaculaOD.getText());
        consultaOftalmologia.getSegmentoPosterior().setMasculaOI(txtMaculaOI.getText());
        consultaOftalmologia.getSegmentoPosterior().setVasosOD(txtVasosOD.getText());
        consultaOftalmologia.getSegmentoPosterior().setVasosOI(txtVasosOI.getText());
        consultaOftalmologia.getSegmentoPosterior().setRetinaPerifericaOD(txtRetinaPerifericaOD.getText());
        consultaOftalmologia.getSegmentoPosterior().setRetinaPerifericaOI(txtRetinaPerifericaOI.getText());


        //Procedimiento Especial
        consultaOftalmologia.getProcedimientoEspecials().clear();
        for (ProcedimientoEspecial pro : listaProcedimientoEspecial) {
            ProcedimientoEspecial p = new ProcedimientoEspecial();
            p.setCamposVisualesOD(pro.getCamposVisualesOD());
            p.setCamposVisualesOI(pro.getCamposVisualesOI());
            p.setTonometriaFecha(pro.getTonometriaFecha());
            p.setTonometriaOD(pro.getTonometriaOD());
            p.setTonometriaOI(pro.getTonometriaOI());
            consultaOftalmologia.getProcedimientoEspecials().add(p);
        }


        //Usuario
        consultaOftalmologia.setUsuario(usuario);
        consultaOftalmologia.setPaciente(paciente);
        return consultaOftalmologia;
    }

    private EvolucionOftalmologia getEvolucion(EvolucionOftalmologia evolucionOftalmologia) {
        evolucionOftalmologia.setEvolucion(txtEvolucion.getText());
        evolucionOftalmologia.getRecetaMedica().setIndicaciones(txtIndicacionesE.getText());
        evolucionOftalmologia.getRecetaMedica().setMedicamentos(txtMedicamentosE.getText());
        evolucionOftalmologia.setConsultaOftalmologia(consultaOftalmologia);

        //Evolucion 2

        evolucionOftalmologia.setVisionLejanaSCOD(txtEVisionLejanaSCOD.getText());
        evolucionOftalmologia.setVisionLejanaSCOI(txtEVisionLejanaSCOI.getText());
        evolucionOftalmologia.setVisionLejanaCCOD(txtEVisionLejanaCCOD.getText());
        evolucionOftalmologia.setVisionLejanaCCOI(txtEVisionLejanaCCOI.getText());
        evolucionOftalmologia.setVisionLejanaOD(txtEVisionLejanaOD.getText());
        evolucionOftalmologia.setVisionLejanaOI(txtEVisionLejanaOI.getText());
        evolucionOftalmologia.setVisionCercanaSCOD(txtEVisionCercanaSCOD.getText());
        evolucionOftalmologia.setVisionCercanaSCOI(txtEVisionCercanaSCOI.getText());
        evolucionOftalmologia.setVisionCercanaCCOD(txtEVisionCercanaCCOD.getText());
        evolucionOftalmologia.setVisionCercanaCCOI(txtEVisionCercanaCCOI.getText());
        evolucionOftalmologia.setVisionCercanaSCJ(cmbEVisionCercanaSCJ.getSelectedItem().toString());
        evolucionOftalmologia.setVisionCercanaCCJ(cmbEVisionCercanaSCJ.getSelectedItem().toString());
        evolucionOftalmologia.setTonometriaFecha(new Date());
        evolucionOftalmologia.setTonometriaOD(txtETonometriaOD.getText());
        evolucionOftalmologia.setTonometriaOI(txtETonometriaOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistEsfOD(txtEDistanciaESFOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistEsfOI(txtEDistanciaESFOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistCilOD(txtEDistanciaCILOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistCilOI(txtEDistanciaCILOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistEjeOD(txtEDistanciaEJEOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistEjeOI(txtEDistanciaEJEOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistPrismaOD(txtEDistanciaPRISMAOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistPrismaOI(txtEDistanciaPRISMAOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistDiOD(txtEDistanciaDIOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistDiOI(txtEDistanciaDIOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistDnpOD(txtEDistanciaDNPOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setDistDnpOI(txtEDistanciaDNPOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setAdicionOD(txtAdicionOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setAdicionOI(txtAdicionOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectEsfOD(txtELecturaESFOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectEsfOI(txtELecturaESFOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectCilOD(txtELecturaCILOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectCilOI(txtELecturaCILOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectEjeOD(txtELecturaEJEOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectEjeOI(txtELecturaEJEOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectPrismaOD(txtELecturaPRISMAOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectPrismaOI(txtELecturaPRISMAOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectDiOD(txtELecturaDIOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectDiOI(txtELecturaDIOI.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectDnpOD(txtELecturaDNPOD.getText());
        evolucionOftalmologia.getRecetaOftalmologia().setLectDnpOI(txtELecturaDNPOI.getText());

        return evolucionOftalmologia;
    }

    private void listarMedicamentos() {
        listMedicamentos = (ArrayList<Object>) OperacionesBD.listarPorUsuario("MedicamentoComercial", usuario);
        for (Object aux : listMedicamentos) {
            cmbMedicamentoDR.addItem((MedicamentoComercial) aux);
            cmbMedicamentoE.addItem((MedicamentoComercial) aux);
        }
    }

    private void listarPatologias() {
        listPatologias = (ArrayList<Object>) OperacionesBD.listarPorUsuario("Patologia", usuario);
        for (Object aux : listPatologias) {
            cmbPatologiaDR.addItem(((Patologia) aux).getNombrePatologia());
            cmbPatologiaE.addItem(((Patologia) aux).getNombrePatologia());
        }
    }

    public static void listarMotivoConsultas() {
        listMotivoConsultas = (ArrayList<Object>) OperacionesBD.listar("Motivo_Consulta");
        cmbMotivoConsulta.removeAllItems();
        for (Object aux : listMotivoConsultas) {
            cmbMotivoConsulta.addItem(((Motivo_Consulta) aux).getMotivo());
        }
    }

    private void cargarConsultas() {
        btnCerrarConsulta.setVisible(false);

        int c = modelotblConsultas.getRowCount();
        try {
            for (int i = 0; i < c; i++) {
                modelotblConsultas.removeRow(0);
            }

        } catch (Exception ex) {
            ex.getMessage();
        }

        listConsultas = (ArrayList<Object>) basedatos.ConsultaOftalmologiaBD.listarConsultas(paciente, usuario);
        for (Object obj : listConsultas) {
            ConsultaOftalmologia consul = (ConsultaOftalmologia) obj;
            Object[] aux = {consul.getNumConsul(),
                consul.getMotivo_Consulta(),
                OperacionesVarias.fechaString(consul.getFechaCreacion())
            };
            modelotblConsultas.addRow(aux);
        }

        //consultas visualizar
        c = modelotblConsultasVisualizar.getRowCount();
        try {
            for (int i = 0; i < c; i++) {
                modelotblConsultasVisualizar.removeRow(0);
            }

        } catch (Exception ex) {
            ex.getMessage();
        }
        listConsultasVisualizar = (ArrayList<ConsultaVisualizar>) ConsultaVisualizarBD.listar(usuario);
        for (ConsultaVisualizar consul : listConsultasVisualizar) {
            Object[] aux = {consul.getConsulta().getNumConsul(),
                consul.getConsulta().getUsuario(),
                consul.getConsulta().getMotivo_Consulta(),
                OperacionesVarias.fechaString(consul.getConsulta().getFechaCreacion())
            };
            modelotblConsultasVisualizar.addRow(aux);
        }
    }

    private void cargarEvoluciones() {
        btnCerrarConsulta.setVisible(false);
        int c = modelotblEvoluciones.getRowCount();
        try {
            for (int i = 0; i < c; i++) {
                modelotblEvoluciones.removeRow(0);
            }

        } catch (Exception ex) {
            ex.getMessage();
        }

        listEvoluciones = (ArrayList<Object>) EvolucionOftalmologiaBD.listarEvoluciones(consultaOftalmologia);
        for (Object obj : listEvoluciones) {
            EvolucionOftalmologia evol = (EvolucionOftalmologia) obj;
            Object[] aux1 = {evol.getNumEvolucion(),
                evol.getEvolucion(),
                OperacionesVarias.fechaString(evol.getFechaCreacion())
            };
            modelotblEvoluciones.addRow(aux1);
        }
    }

    private void cargarEvolucionesVisualizar() {
        btnCerrarConsulta.setVisible(false);
        int c = modelotblEvolucionesVisualizar.getRowCount();
        try {
            for (int i = 0; i < c; i++) {
                modelotblEvolucionesVisualizar.removeRow(0);
            }

        } catch (Exception ex) {
            ex.getMessage();
        }

        listEvolucionesVisualizar = (ArrayList<Evolucion>) EvolucionBD.listarEvoluciones(consultaVisualizar.getConsulta());
        for (Evolucion evol : listEvolucionesVisualizar) {
            Object[] aux1 = {evol.getNumEvolucion(),
                evol.getEvolucion(),
                OperacionesVarias.fechaString(evol.getFechaCreacion())
            };
            modelotblEvolucionesVisualizar.addRow(aux1);
        }
    }

    private void setConsulta(ConsultaOftalmologia consul) {
        txtMotivoConsulta.setText("");
        for (int i = 0; i < consul.getMotivo_Consulta().size(); i++) {
            txtMotivoConsulta.setText(txtMotivoConsulta.getText() + (i + 1) + ".- " + consul.getMotivo_Consulta().get(i) + "    ");
        }
        txtNumConsulta.setText("" + consultaOftalmologia.getNumConsul());
        txtEnfermedadActual.setText(consul.getEnfermedadActual());
        GregorianCalendar c = new GregorianCalendar();
        c.setTime(consul.getFechaCreacion());
        String dia = Calendario.diasCalendario[c.get(GregorianCalendar.DAY_OF_WEEK) - 1];
        txtFecha.setText(dia + ", " + OperacionesVarias.fechaString(c.getTime()));
        txtHora.setText(c.get(GregorianCalendar.HOUR) + ":" + c.get(GregorianCalendar.MINUTE) + ":" + c.get(GregorianCalendar.SECOND));
        txtAntecedentFami.setText(consul.getAntecedent_Fami());
        txtAntecedentPerson.setText(consul.getAntecedent_Person());
//        txtTemperatura.setText(consulta.getExamenFisico().getTemperatura());

        //Datos Diagnostico y  Receta Medica
        txtMedicamentosDR.setText(consul.getRecetaMedica().getMedicamentos());
        txtIndicacionDR.setText(consul.getRecetaMedica().getIndicaciones());
        pnlDiagnosticos.removeAll();
        pnlsDiagnosticos = new ArrayList<pnlDiagnostico>();

        for (Diagnostico diag : consul.getDiagnosticos()) {
            pnlDiagnostico pnl = new pnlDiagnostico();
            pnl.setDiagnostico(diag.getDiagnostico());
            pnl.setSeleccion(diag.getTipo());
            pnl.setIdDiagnostico(diag.getIdDiagnostico());
            pnlsDiagnosticos.add(pnl);
            pnlDiagnosticos.add(pnlsDiagnosticos.get(pnlsDiagnosticos.size() - 1));
        }
        txtAnexoDR.setText(consul.getAnexos());

        //Datos Examen Fisico
//        txtTa.setText(consul.getExamenFisico().gettA());
//        txtFc.setText(consul.getExamenFisico().getfC());
//        txtFr.setText(consul.getExamenFisico().getfR());
//        txtSat02.setText(consul.getExamenFisico().getSat02());
//        txtLlenadoCapilar.setText(consul.getExamenFisico().getLlenadocapilar());
//        txtGlicemia.setText(consul.getExamenFisico().getGlicemia());
//        txtPeso.setText("" + consul.getExamenFisico().getPeso());
//        txtTalla.setText("" + consul.getExamenFisico().getTalla());
//        cmbBiotipoConst.setSelectedItem(consul.getExamenFisico().getBiotipoConst());
//        txtPsicoexpresiva.setText(consul.getExamenFisico().getPsicoexpresiva());
//        txtSomatoexpresiva.setText(consul.getExamenFisico().getSomatoexpresiva());
//        cmbEstadoNutri.setSelectedItem(consul.getExamenFisico().getEstadoNutricional());
//        txtImc.setText("" + calcularIMC(txtTalla.getText(), txtPeso.getText()));

        //Segmento Anterior
        motilidadOcularOD.setText(consultaOftalmologia.getSegmentoAnterior().getMotilidadOcularOD());
        motilidadOcularOI.setText(consultaOftalmologia.getSegmentoAnterior().getMotilidadOcularOI());
        tonometriaOD.setText(consultaOftalmologia.getSegmentoAnterior().getTonometriaOD());
        tonometriaOI.setText(consultaOftalmologia.getSegmentoAnterior().getTonometriaOI());
        parpadosPestanasOD.setText(consultaOftalmologia.getSegmentoAnterior().getParpadosPestanasOD());
        parpadosPestanasOI.setText(consultaOftalmologia.getSegmentoAnterior().getParpadosPestanasOI());
        viasLacrimalesOD.setText(consultaOftalmologia.getSegmentoAnterior().getViasLacrimalesOD());
        viasLacrimalesOI.setText(consultaOftalmologia.getSegmentoAnterior().getViasLacrimalesOI());
        conjuntivaOD.setText(consultaOftalmologia.getSegmentoAnterior().getConjuntivaOD());
        conjuntivaOI.setText(consultaOftalmologia.getSegmentoAnterior().getConjuntivaOI());
        corneaOD.setText(consultaOftalmologia.getSegmentoAnterior().getCorneaOD());
        corneaOI.setText(consultaOftalmologia.getSegmentoAnterior().getCorneaOI());
        camaraAnteriorOD.setText(consultaOftalmologia.getSegmentoAnterior().getCamaraAnteriorOD());
        camaraAnteriorOI.setText(consultaOftalmologia.getSegmentoAnterior().getCamaraAnteriorOI());
        pupilaOD.setText(consultaOftalmologia.getSegmentoAnterior().getPupilaOD());
        pupilaOI.setText(consultaOftalmologia.getSegmentoAnterior().getPupilaOI());
        irisOD.setText(consultaOftalmologia.getSegmentoAnterior().getIrisOD());
        irisOI.setText(consultaOftalmologia.getSegmentoAnterior().getIrisOI());
        anguloIridoCornealOD.setText(consultaOftalmologia.getSegmentoAnterior().getAnguloIridoCornealOD());
        anguloIridoCornealOI.setText(consultaOftalmologia.getSegmentoAnterior().getAnguloIridoCornealOI());
        cristalinoOD.setText(consultaOftalmologia.getSegmentoAnterior().getCristalinoOD());
        cristalinoOI.setText(consultaOftalmologia.getSegmentoAnterior().getCristalinoOI());

        //Segmento Posterior
        txtVitreoOD.setText(consultaOftalmologia.getSegmentoPosterior().getVitreoOD());
        txtVitreoOI.setText(consultaOftalmologia.getSegmentoPosterior().getVitreoOI());
        txtDiscoOpticoOD.setText(consultaOftalmologia.getSegmentoPosterior().getDiscoOpticoOD());
        txtDiscoOpticoOI.setText(consultaOftalmologia.getSegmentoPosterior().getDiscoOpticoOI());
        txtMaculaOD.setText(consultaOftalmologia.getSegmentoPosterior().getMasculaOD());
        txtMaculaOI.setText(consultaOftalmologia.getSegmentoPosterior().getMasculaOI());
        txtVasosOD.setText(consultaOftalmologia.getSegmentoPosterior().getVasosOD());
        txtVasosOI.setText(consultaOftalmologia.getSegmentoPosterior().getVasosOI());
        txtRetinaPerifericaOD.setText(consultaOftalmologia.getSegmentoPosterior().getRetinaPerifericaOD());
        txtRetinaPerifericaOI.setText(consultaOftalmologia.getSegmentoPosterior().getRetinaPerifericaOI());

        //Procedimiento especial
        listaProcedimientoEspecial = consultaOftalmologia.getProcedimientoEspecials();
        cargarTblProcedimientoEspecial();

        setEstadoForm(IFrmHCGeneralOftalmologia.VIEW_CONSULTA);
    }

    private void setEvolucion(EvolucionOftalmologia evolu) {
        GregorianCalendar c = new GregorianCalendar();
        c.setTime(evolu.getFechaCreacion());
        String dia = Calendario.diasCalendario[c.get(GregorianCalendar.DAY_OF_WEEK) - 1];
        txtFechaEvolucion.setText(dia + ", " + OperacionesVarias.fechaString(c.getTime()));
        txtHoraEvolucion.setText(c.get(GregorianCalendar.HOUR) + ":" + c.get(GregorianCalendar.MINUTE) + ":" + c.get(GregorianCalendar.SECOND));
        evolucionOftalmologia.setFechaCreacion(c.getTime());
        txtEvolucion.setText(evolu.getEvolucion());
        txtMedicamentosE.setText(evolu.getRecetaMedica().getMedicamentos());
        txtIndicacionesE.setText(evolu.getRecetaMedica().getIndicaciones());
        tpnlPaneles.removeAll();
        tpnlPaneles.add(pnlEvolucion1);
        tpnlPaneles.setTitleAt(tpnlPaneles.getTabCount() - 1, "Evolucion");
        setEstadoForm(IFrmHCGeneralOftalmologia.VIEW_CONSULTA);

        //Evolucion 2
        txtEVisionLejanaSCOD.setText(evolu.getVisionLejanaSCOD());
        txtEVisionLejanaSCOI.setText(evolu.getVisionLejanaSCOI());
        txtEVisionLejanaCCOD.setText(evolu.getVisionLejanaCCOD());
        txtEVisionLejanaCCOI.setText(evolu.getVisionLejanaCCOI());
        txtEVisionLejanaOD.setText(evolu.getVisionLejanaOD());
        txtEVisionLejanaOI.setText(evolu.getVisionLejanaOI());
        txtEVisionCercanaSCOD.setText(evolu.getVisionCercanaSCOD());
        txtEVisionCercanaSCOI.setText(evolu.getVisionCercanaSCOI());
        txtEVisionCercanaCCOD.setText(evolu.getVisionCercanaCCOD());
        txtEVisionCercanaCCOI.setText(evolu.getVisionCercanaCCOI());
        cmbEVisionCercanaSCJ.setSelectedItem(evolu.getVisionCercanaSCJ());
        cmbEVisionCercanaCCJ.setSelectedItem(evolu.getVisionCercanaCCJ());
        DateFormat d = DateFormat.getDateInstance(DateFormat.SHORT);
        txtETonometriaFecha.setText(d.format(evolu.getTonometriaFecha()));
        txtETonometriaHora.setText("");
        txtETonometriaOD.setText(evolu.getTonometriaOD());
        txtETonometriaOI.setText(evolu.getTonometriaOI());
        txtEDistanciaESFOD.setText(evolu.getRecetaOftalmologia().getDistEsfOD());
        txtEDistanciaESFOI.setText(evolu.getRecetaOftalmologia().getDistEsfOI());
        txtEDistanciaCILOD.setText(evolu.getRecetaOftalmologia().getDistCilOD());
        txtEDistanciaCILOI.setText(evolu.getRecetaOftalmologia().getDistCilOI());
        txtEDistanciaEJEOD.setText(evolu.getRecetaOftalmologia().getDistEjeOD());
        txtEDistanciaEJEOI.setText(evolu.getRecetaOftalmologia().getDistEjeOI());
        txtEDistanciaPRISMAOD.setText(evolu.getRecetaOftalmologia().getDistPrismaOD());
        txtEDistanciaPRISMAOI.setText(evolu.getRecetaOftalmologia().getDistPrismaOI());
        txtEDistanciaDIOD.setText(evolu.getRecetaOftalmologia().getDistDiOD());
        txtEDistanciaDIOI.setText(evolu.getRecetaOftalmologia().getDistDiOI());
        txtEDistanciaDNPOD.setText(evolu.getRecetaOftalmologia().getDistDnpOD());
        txtEDistanciaDNPOI.setText(evolu.getRecetaOftalmologia().getDistDnpOI());
        txtAdicionOD.setText(evolu.getRecetaOftalmologia().getAdicionOD());
        txtAdicionOI.setText(evolu.getRecetaOftalmologia().getAdicionOI());
        txtELecturaESFOD.setText(evolu.getRecetaOftalmologia().getLectEsfOD());
        txtELecturaESFOI.setText(evolu.getRecetaOftalmologia().getLectEsfOI());
        txtELecturaCILOD.setText(evolu.getRecetaOftalmologia().getLectCilOD());
        txtELecturaCILOI.setText(evolu.getRecetaOftalmologia().getLectCilOI());
        txtELecturaEJEOD.setText(evolu.getRecetaOftalmologia().getLectEjeOD());
        txtELecturaEJEOI.setText(evolu.getRecetaOftalmologia().getLectEjeOI());
        txtELecturaPRISMAOD.setText(evolu.getRecetaOftalmologia().getLectPrismaOD());
        txtELecturaPRISMAOI.setText(evolu.getRecetaOftalmologia().getLectPrismaOI());
        txtELecturaDIOD.setText(evolu.getRecetaOftalmologia().getLectDiOD());
        txtELecturaDIOI.setText(evolu.getRecetaOftalmologia().getLectDiOI());
        txtELecturaDNPOD.setText(evolu.getRecetaOftalmologia().getLectDnpOD());
        txtELecturaDNPOI.setText(evolu.getRecetaOftalmologia().getLectDnpOI());

    }

    private void cargarTblProcedimientoEspecial() {
        int cc = modelotblProcedimientoEspecial.getRowCount();
        try {
            for (int i = 0; i < cc; i++) {
                modelotblProcedimientoEspecial.removeRow(0);
            }

        } catch (Exception ex) {
            ex.getMessage();
        }

        int cont = 0;
        for (ProcedimientoEspecial proce : listaProcedimientoEspecial) {
            cont++;
            Object[] aux1 = {cont,
                proce.getTonometriaFecha()
            };
            modelotblProcedimientoEspecial.addRow(aux1);
        }
    }

    private BigDecimal calcularIMC(String tall, String pes) {
        BigDecimal big = new BigDecimal("0");
        try {
            double talla = Integer.parseInt(tall);
            double num1 = Math.pow((talla / 100), 2);
            double peso = Double.parseDouble(pes);
            double resp = (peso / num1);
            big = new BigDecimal(resp);
            big = big.setScale(2, RoundingMode.HALF_UP);
        } catch (NumberFormatException e) {
        }
        return big;
    }

    private void setEditable(boolean esEditable) {
        cmbMotivoConsulta.setEnabled(esEditable);
        btnAddMotivoConsul.setEnabled(esEditable);
        btnAgregarMotivoConsulta.setEnabled(esEditable);
        txtMotivoConsulta.setEditable(esEditable);
        txtEnfermedadActual.setEditable(esEditable);
        txtAntecedentFami.setEditable(esEditable);
        txtAntecedentPerson.setEditable(esEditable);

        //Diagnostico-Receta
        for (pnlDiagnostico pnl : pnlsDiagnosticos) {
            pnl.getTxt().setEnabled(esEditable);
            pnl.getRbtnDefinitivo().setEnabled(esEditable);
            pnl.getRbtnPresuntivo().setEnabled(esEditable);
        }

        txtAnexoDR.setEditable(esEditable);
        cmbMedicamentoDR.setEnabled(esEditable);
        cmbPatologiaDR.setEnabled(esEditable);
        txtCantidadMedicamentosDR.setEditable(esEditable);
        btnAgregarMedicamentoDR.setEnabled(esEditable);
        btnAgregarPatologiaDR.setEnabled(esEditable);
        txtMedicamentosDR.setEditable(esEditable);
        txtIndicacionDR.setEditable(esEditable);
        btnAgregarDR.setEnabled(esEditable);
        btnGuardarConsulta.setEnabled(esEditable);
        btnImprimirReceta.setEnabled(esEditable);

        //Examen Fisico
//        txtTa.setEditable(esEditable);
//        txtFc.setEditable(esEditable);
//        txtFr.setEditable(esEditable);
//        txtTemperatura.setEditable(esEditable);
//        cmbTemperatura.setEnabled(esEditable);
//        txtSat02.setEditable(esEditable);
//        txtLlenadoCapilar.setEditable(esEditable);
//        txtGlicemia.setEditable(esEditable);
//        txtPeso.setEditable(esEditable);
//        txtTalla.setEditable(esEditable);
//        cmbBiotipoConst.setEnabled(esEditable);
//        txtPsicoexpresiva.setEditable(esEditable);
//        txtSomatoexpresiva.setEditable(esEditable);
//        cmbEstadoNutri.setEnabled(esEditable);

        //Segmento Anterior
        motilidadOcularOD.setEditable(esEditable);
        motilidadOcularOI.setEditable(esEditable);
        tonometriaOD.setEditable(esEditable);
        tonometriaOI.setEditable(esEditable);
        parpadosPestanasOD.setEditable(esEditable);
        parpadosPestanasOI.setEditable(esEditable);
        viasLacrimalesOD.setEditable(esEditable);
        viasLacrimalesOI.setEditable(esEditable);
        conjuntivaOD.setEditable(esEditable);
        conjuntivaOI.setEditable(esEditable);
        corneaOD.setEditable(esEditable);
        corneaOI.setEditable(esEditable);
        camaraAnteriorOD.setEditable(esEditable);
        camaraAnteriorOI.setEditable(esEditable);
        pupilaOD.setEditable(esEditable);
        pupilaOI.setEditable(esEditable);
        irisOD.setEditable(esEditable);
        irisOI.setEditable(esEditable);
        anguloIridoCornealOD.setEditable(esEditable);
        anguloIridoCornealOI.setEditable(esEditable);
        cristalinoOD.setEditable(esEditable);
        cristalinoOI.setEditable(esEditable);


        //Segmento Posterior
        txtVitreoOD.setEditable(esEditable);
        txtVitreoOI.setEditable(esEditable);
        txtDiscoOpticoOD.setEditable(esEditable);
        txtDiscoOpticoOI.setEditable(esEditable);
        txtMaculaOD.setEditable(esEditable);
        txtMaculaOI.setEditable(esEditable);
        txtVasosOD.setEditable(esEditable);
        txtVasosOI.setEditable(esEditable);
        txtRetinaPerifericaOD.setEditable(esEditable);
        txtRetinaPerifericaOI.setEditable(esEditable);

        //Procedimiento especial
        txtCamposVisualesOD.setEditable(esEditable);
        txtCamposVisualesOI.setEditable(esEditable);
        txtTonometriaOD.setEditable(esEditable);
        txtTonometriaOI.setEditable(esEditable);
    }

    private void setEditableEvolucion(boolean esEditable) {
        txtEvolucion.setEditable(esEditable);
        cmbMedicamentoE.setEnabled(esEditable);
        cmbPatologiaE.setEnabled(esEditable);
        txtCantidadMedicamentosE.setEditable(esEditable);
        btnAgregarMedicamentoE.setEnabled(esEditable);
        btnAgregarPatologiaE.setEnabled(esEditable);
        txtMedicamentosE.setEditable(esEditable);
        txtIndicacionesE.setEditable(esEditable);
        btnGuardarEvolucion.setEnabled(esEditable);
        btnImprimirEvolucion.setEnabled(esEditable);

        //Evolucion 2
        txtEVisionLejanaSCOD.setEditable(esEditable);
        txtEVisionLejanaSCOI.setEditable(esEditable);
        txtEVisionLejanaCCOD.setEditable(esEditable);
        txtEVisionLejanaCCOI.setEditable(esEditable);
        txtEVisionLejanaOD.setEditable(esEditable);
        txtEVisionLejanaOI.setEditable(esEditable);
        txtEVisionCercanaSCOD.setEditable(esEditable);
        txtEVisionCercanaSCOI.setEditable(esEditable);
        txtEVisionCercanaCCOD.setEditable(esEditable);
        txtEVisionCercanaCCOI.setEditable(esEditable);
        cmbEVisionCercanaSCJ.setEnabled(esEditable);
        cmbEVisionCercanaCCJ.setEnabled(esEditable);
        txtETonometriaFecha.setEditable(esEditable);
        txtETonometriaHora.setEditable(esEditable);
        txtETonometriaOD.setEditable(esEditable);
        txtETonometriaOI.setEditable(esEditable);
        txtEDistanciaESFOD.setEditable(esEditable);
        txtEDistanciaESFOI.setEditable(esEditable);
        txtEDistanciaCILOD.setEditable(esEditable);
        txtEDistanciaCILOI.setEditable(esEditable);
        txtEDistanciaEJEOD.setEditable(esEditable);
        txtEDistanciaEJEOI.setEditable(esEditable);
        txtEDistanciaPRISMAOD.setEditable(esEditable);
        txtEDistanciaPRISMAOI.setEditable(esEditable);
        txtEDistanciaDIOD.setEditable(esEditable);
        txtEDistanciaDIOI.setEditable(esEditable);
        txtEDistanciaDNPOD.setEditable(esEditable);
        txtEDistanciaDNPOI.setEditable(esEditable);
        txtAdicionOD.setEditable(esEditable);
        txtAdicionOI.setEditable(esEditable);
        txtELecturaESFOD.setEditable(esEditable);
        txtELecturaESFOI.setEditable(esEditable);
        txtELecturaCILOD.setEditable(esEditable);
        txtELecturaCILOI.setEditable(esEditable);
        txtELecturaEJEOD.setEditable(esEditable);
        txtELecturaEJEOI.setEditable(esEditable);
        txtELecturaPRISMAOD.setEditable(esEditable);
        txtELecturaPRISMAOI.setEditable(esEditable);
        txtELecturaDIOD.setEditable(esEditable);
        txtELecturaDIOI.setEditable(esEditable);
        txtELecturaDNPOD.setEditable(esEditable);
        txtELecturaDNPOI.setEditable(esEditable);

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlConsultas = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel49 = new javax.swing.JLabel();
        jScrollPane11 = new javax.swing.JScrollPane();
        tblEvoluciones = new JTable() {
            public boolean isCellEditable(int rowIndex, int vColIndex) {
                return false;
            }
        };
        jLabel48 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        tblConsultas = new JTable() {
            public boolean isCellEditable(int rowIndex, int vColIndex) {
                return false;
            }
        };
        jScrollPane13 = new javax.swing.JScrollPane();
        tblConsultasVisualizar = new JTable() {
            public boolean isCellEditable(int rowIndex, int vColIndex) {
                return false;
            }
        };
        jLabel50 = new javax.swing.JLabel();
        jScrollPane14 = new javax.swing.JScrollPane();
        tblEvolucionesVisualizar = new JTable() {
            public boolean isCellEditable(int rowIndex, int vColIndex) {
                return false;
            }
        };
        jLabel51 = new javax.swing.JLabel();
        jPopupMenu1 = new javax.swing.JPopupMenu();
        mnConsultaVisualizacion = new javax.swing.JMenuItem();
        tpnlPaneles = new javax.swing.JTabbedPane();
        pnlAnamnesis = new javax.swing.JPanel();
        pnlId = new javax.swing.JPanel();
        txtMotivoConsulta = new javax.swing.JTextField();
        cmbMotivoConsulta = new javax.swing.JComboBox();
        btnAgregarMotivoConsulta = new javax.swing.JButton();
        btnAddMotivoConsul = new javax.swing.JButton();
        pnlId1 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        txtEnfermedadActual = new javax.swing.JTextArea();
        pnlId2 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        jScrollPane6 = new javax.swing.JScrollPane();
        txtAntecedentPerson = new javax.swing.JTextArea();
        jPanel5 = new javax.swing.JPanel();
        jLabel23 = new javax.swing.JLabel();
        jScrollPane7 = new javax.swing.JScrollPane();
        txtAntecedentFami = new javax.swing.JTextArea();
        jLabel97 = new javax.swing.JLabel();
        jScrollPane26 = new javax.swing.JScrollPane();
        txtOculares = new javax.swing.JTextArea();
        pnlRefraccion = new javax.swing.JPanel();
        pnlId6 = new javax.swing.JPanel();
        txtVisionCercanaSCOD = new javax.swing.JTextField();
        txtVisionCercanaCCOI = new javax.swing.JTextField();
        txtVisionCercanaSCOI = new javax.swing.JTextField();
        jLabel74 = new javax.swing.JLabel();
        txtVisionCercanaCCOD = new javax.swing.JTextField();
        jLabel75 = new javax.swing.JLabel();
        jLabel73 = new javax.swing.JLabel();
        jLabel80 = new javax.swing.JLabel();
        comboSC = new javax.swing.JComboBox();
        comboCC = new javax.swing.JComboBox();
        pnlId8 = new javax.swing.JPanel();
        jLabel60 = new javax.swing.JLabel();
        jLabel61 = new javax.swing.JLabel();
        jLabel62 = new javax.swing.JLabel();
        jLabel63 = new javax.swing.JLabel();
        txtVisionLejanaSCOD = new javax.swing.JTextField();
        txtVisionLejanaCCOD = new javax.swing.JTextField();
        jLabel64 = new javax.swing.JLabel();
        jLabel65 = new javax.swing.JLabel();
        txtComentOD = new javax.swing.JTextField();
        txtComentOI = new javax.swing.JTextField();
        txtVisionLejanaCCOI = new javax.swing.JTextField();
        jLabel93 = new javax.swing.JLabel();
        jLabel108 = new javax.swing.JLabel();
        txtVisionLejanaSCOI = new javax.swing.JTextField();
        pnlId9 = new javax.swing.JPanel();
        jLabel70 = new javax.swing.JLabel();
        jLabel71 = new javax.swing.JLabel();
        txtAutorefracOI = new javax.swing.JTextField();
        txtAutorefracOD = new javax.swing.JTextField();
        pnlId10 = new javax.swing.JPanel();
        jLabel72 = new javax.swing.JLabel();
        jLabel76 = new javax.swing.JLabel();
        jLabel52 = new javax.swing.JLabel();
        txtDistanciaEsfOD = new javax.swing.JTextField();
        txtDistanciaEsfOI = new javax.swing.JTextField();
        jLabel53 = new javax.swing.JLabel();
        jLabel54 = new javax.swing.JLabel();
        jLabel55 = new javax.swing.JLabel();
        jLabel68 = new javax.swing.JLabel();
        jLabel69 = new javax.swing.JLabel();
        jLabel77 = new javax.swing.JLabel();
        txtDistanciaCilOD = new javax.swing.JTextField();
        txtDistanciaEjeOD = new javax.swing.JTextField();
        txtDistanciaPrismaOD = new javax.swing.JTextField();
        txtDistanciaDnpOD = new javax.swing.JTextField();
        txtDistanciaDiOD = new javax.swing.JTextField();
        txtDistanciaCilOI = new javax.swing.JTextField();
        txtDistanciaEjeOI = new javax.swing.JTextField();
        txtDistanciaPrismaOI = new javax.swing.JTextField();
        txtDistanciaDIOI = new javax.swing.JTextField();
        txtDistanciaDnpOI = new javax.swing.JTextField();
        jTextField30 = new javax.swing.JTextField();
        jTextField31 = new javax.swing.JTextField();
        jLabel78 = new javax.swing.JLabel();
        jLabel79 = new javax.swing.JLabel();
        jTextField32 = new javax.swing.JTextField();
        jTextField33 = new javax.swing.JTextField();
        jTextField34 = new javax.swing.JTextField();
        jTextField35 = new javax.swing.JTextField();
        jLabel81 = new javax.swing.JLabel();
        jLabel82 = new javax.swing.JLabel();
        txtLecturaEjeOD = new javax.swing.JTextField();
        jLabel83 = new javax.swing.JLabel();
        txtLecturaEjeOI = new javax.swing.JTextField();
        txtLecturaCilOI = new javax.swing.JTextField();
        txtLecturaCilOD = new javax.swing.JTextField();
        jLabel84 = new javax.swing.JLabel();
        jLabel85 = new javax.swing.JLabel();
        txtLecturaEsfOD = new javax.swing.JTextField();
        txtLecturaEsfOI = new javax.swing.JTextField();
        jLabel86 = new javax.swing.JLabel();
        jLabel87 = new javax.swing.JLabel();
        jLabel88 = new javax.swing.JLabel();
        txtAdicOD = new javax.swing.JTextField();
        txtAdicOI = new javax.swing.JTextField();
        jLabel89 = new javax.swing.JLabel();
        jLabel90 = new javax.swing.JLabel();
        txtVisionColores = new javax.swing.JTextField();
        txtVisionProfundidad = new javax.swing.JTextField();
        btnRecetaDeLentes = new javax.swing.JButton();
        jLabel110 = new javax.swing.JLabel();
        txtSensibContraste = new javax.swing.JTextField();
        pnlSegmentoAnterior = new javax.swing.JPanel();
        pnlId12 = new javax.swing.JPanel();
        jLabel99 = new javax.swing.JLabel();
        jLabel100 = new javax.swing.JLabel();
        motilidadOcularOI = new javax.swing.JTextField();
        motilidadOcularOD = new javax.swing.JTextField();
        pnlId13 = new javax.swing.JPanel();
        jLabel95 = new javax.swing.JLabel();
        jLabel96 = new javax.swing.JLabel();
        jLabel103 = new javax.swing.JLabel();
        jLabel104 = new javax.swing.JLabel();
        tonometriaOD = new javax.swing.JTextField();
        tonometriaOI = new javax.swing.JTextField();
        pnlId14 = new javax.swing.JPanel();
        jLabel109 = new javax.swing.JLabel();
        camaraAnteriorOI = new javax.swing.JTextField();
        jLabel101 = new javax.swing.JLabel();
        camaraAnteriorOD = new javax.swing.JTextField();
        corneaOD = new javax.swing.JTextField();
        jLabel102 = new javax.swing.JLabel();
        corneaOI = new javax.swing.JTextField();
        conjuntivaOI = new javax.swing.JTextField();
        conjuntivaOD = new javax.swing.JTextField();
        pupilaOI = new javax.swing.JTextField();
        pupilaOD = new javax.swing.JTextField();
        jLabel111 = new javax.swing.JLabel();
        irisOI = new javax.swing.JTextField();
        irisOD = new javax.swing.JTextField();
        jLabel112 = new javax.swing.JLabel();
        jLabel114 = new javax.swing.JLabel();
        anguloIridoCornealOI = new javax.swing.JTextField();
        anguloIridoCornealOD = new javax.swing.JTextField();
        cristalinoOD = new javax.swing.JTextField();
        cristalinoOI = new javax.swing.JTextField();
        jLabel115 = new javax.swing.JLabel();
        jPanel17 = new javax.swing.JPanel();
        viasLacrimalesOD = new javax.swing.JTextField();
        jLabel106 = new javax.swing.JLabel();
        jLabel92 = new javax.swing.JLabel();
        jLabel107 = new javax.swing.JLabel();
        parpadosPestanasOD = new javax.swing.JTextField();
        parpadosPestanasOI = new javax.swing.JTextField();
        viasLacrimalesOI = new javax.swing.JTextField();
        jLabel168 = new javax.swing.JLabel();
        pnlSegmentoPosterior = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        jLabel91 = new javax.swing.JLabel();
        jLabel116 = new javax.swing.JLabel();
        jLabel94 = new javax.swing.JLabel();
        jPanel18 = new javax.swing.JPanel();
        jTextField80 = new javax.swing.JTextField();
        jLabel118 = new javax.swing.JLabel();
        jLabel119 = new javax.swing.JLabel();
        jLabel120 = new javax.swing.JLabel();
        jTextField81 = new javax.swing.JTextField();
        jLabel121 = new javax.swing.JLabel();
        jLabel122 = new javax.swing.JLabel();
        jTextField82 = new javax.swing.JTextField();
        jTextField83 = new javax.swing.JTextField();
        jLabel123 = new javax.swing.JLabel();
        jTextField84 = new javax.swing.JTextField();
        jTextField85 = new javax.swing.JTextField();
        jTextField86 = new javax.swing.JTextField();
        jTextField87 = new javax.swing.JTextField();
        jLabel124 = new javax.swing.JLabel();
        jPanel19 = new javax.swing.JPanel();
        jTextField88 = new javax.swing.JTextField();
        jLabel125 = new javax.swing.JLabel();
        jLabel126 = new javax.swing.JLabel();
        jLabel127 = new javax.swing.JLabel();
        jTextField89 = new javax.swing.JTextField();
        jLabel128 = new javax.swing.JLabel();
        jLabel129 = new javax.swing.JLabel();
        jTextField90 = new javax.swing.JTextField();
        jTextField91 = new javax.swing.JTextField();
        jLabel130 = new javax.swing.JLabel();
        jTextField92 = new javax.swing.JTextField();
        jTextField93 = new javax.swing.JTextField();
        jTextField94 = new javax.swing.JTextField();
        jTextField95 = new javax.swing.JTextField();
        jLabel131 = new javax.swing.JLabel();
        jPanel20 = new javax.swing.JPanel();
        jTextField96 = new javax.swing.JTextField();
        jLabel132 = new javax.swing.JLabel();
        jLabel133 = new javax.swing.JLabel();
        jLabel134 = new javax.swing.JLabel();
        jTextField97 = new javax.swing.JTextField();
        jLabel135 = new javax.swing.JLabel();
        jLabel136 = new javax.swing.JLabel();
        jTextField98 = new javax.swing.JTextField();
        jTextField99 = new javax.swing.JTextField();
        jLabel137 = new javax.swing.JLabel();
        jTextField100 = new javax.swing.JTextField();
        jTextField101 = new javax.swing.JTextField();
        jTextField102 = new javax.swing.JTextField();
        jTextField103 = new javax.swing.JTextField();
        jLabel138 = new javax.swing.JLabel();
        jScrollPane15 = new javax.swing.JScrollPane();
        txtCamposVisualesOI = new javax.swing.JTextArea();
        jScrollPane16 = new javax.swing.JScrollPane();
        txtCamposVisualesOD = new javax.swing.JTextArea();
        pnlId15 = new javax.swing.JPanel();
        jLabel98 = new javax.swing.JLabel();
        jLabel105 = new javax.swing.JLabel();
        jLabel113 = new javax.swing.JLabel();
        jLabel117 = new javax.swing.JLabel();
        txtTonometriaOD = new javax.swing.JTextField();
        txtTonometriaOI = new javax.swing.JTextField();
        txtTonometriaHora = new javax.swing.JTextField();
        txtTonometriaFecha = new javax.swing.JTextField();
        btnNuevo = new javax.swing.JButton();
        btnGuardar = new javax.swing.JButton();
        jScrollPane17 = new javax.swing.JScrollPane();
        tblProcedimientosEspeciales = new JTable() {
            public boolean isCellEditable(int rowIndex, int vColIndex) {
                return false;
            }
        };
        jPanel21 = new javax.swing.JPanel();
        txtDiscoOpticoOD = new javax.swing.JTextField();
        jLabel139 = new javax.swing.JLabel();
        jLabel140 = new javax.swing.JLabel();
        jLabel141 = new javax.swing.JLabel();
        txtVitreoOD = new javax.swing.JTextField();
        jLabel142 = new javax.swing.JLabel();
        jLabel143 = new javax.swing.JLabel();
        txtVasosOD = new javax.swing.JTextField();
        txtMaculaOD = new javax.swing.JTextField();
        jLabel144 = new javax.swing.JLabel();
        txtVitreoOI = new javax.swing.JTextField();
        txtDiscoOpticoOI = new javax.swing.JTextField();
        txtMaculaOI = new javax.swing.JTextField();
        txtVasosOI = new javax.swing.JTextField();
        jLabel145 = new javax.swing.JLabel();
        jPanel22 = new javax.swing.JPanel();
        jTextField112 = new javax.swing.JTextField();
        jLabel146 = new javax.swing.JLabel();
        jLabel147 = new javax.swing.JLabel();
        jLabel148 = new javax.swing.JLabel();
        jTextField113 = new javax.swing.JTextField();
        jLabel149 = new javax.swing.JLabel();
        jLabel150 = new javax.swing.JLabel();
        jTextField114 = new javax.swing.JTextField();
        jTextField115 = new javax.swing.JTextField();
        jLabel151 = new javax.swing.JLabel();
        jTextField116 = new javax.swing.JTextField();
        jTextField117 = new javax.swing.JTextField();
        jTextField118 = new javax.swing.JTextField();
        jTextField119 = new javax.swing.JTextField();
        jLabel152 = new javax.swing.JLabel();
        jPanel23 = new javax.swing.JPanel();
        jTextField120 = new javax.swing.JTextField();
        jLabel153 = new javax.swing.JLabel();
        jLabel154 = new javax.swing.JLabel();
        jLabel155 = new javax.swing.JLabel();
        jTextField121 = new javax.swing.JTextField();
        jLabel156 = new javax.swing.JLabel();
        jLabel157 = new javax.swing.JLabel();
        jTextField122 = new javax.swing.JTextField();
        jTextField123 = new javax.swing.JTextField();
        jLabel158 = new javax.swing.JLabel();
        jTextField124 = new javax.swing.JTextField();
        jTextField125 = new javax.swing.JTextField();
        jTextField126 = new javax.swing.JTextField();
        jTextField127 = new javax.swing.JTextField();
        jLabel159 = new javax.swing.JLabel();
        jPanel24 = new javax.swing.JPanel();
        jTextField128 = new javax.swing.JTextField();
        jLabel160 = new javax.swing.JLabel();
        jLabel161 = new javax.swing.JLabel();
        jLabel162 = new javax.swing.JLabel();
        jTextField129 = new javax.swing.JTextField();
        jLabel163 = new javax.swing.JLabel();
        jLabel164 = new javax.swing.JLabel();
        jTextField130 = new javax.swing.JTextField();
        jTextField131 = new javax.swing.JTextField();
        jLabel165 = new javax.swing.JLabel();
        jTextField132 = new javax.swing.JTextField();
        jTextField133 = new javax.swing.JTextField();
        jTextField134 = new javax.swing.JTextField();
        jTextField135 = new javax.swing.JTextField();
        jLabel166 = new javax.swing.JLabel();
        jLabel167 = new javax.swing.JLabel();
        txtRetinaPerifericaOD = new javax.swing.JTextField();
        txtRetinaPerifericaOI = new javax.swing.JTextField();
        pnlDiagReceta = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        pnlDiagnosticos = new javax.swing.JPanel();
        btnAgregarDR = new javax.swing.JButton();
        jPanel13 = new javax.swing.JPanel();
        jPanel14 = new javax.swing.JPanel();
        jLabel27 = new javax.swing.JLabel();
        jScrollPane8 = new javax.swing.JScrollPane();
        txtIndicacionDR = new javax.swing.JTextArea();
        jScrollPane9 = new javax.swing.JScrollPane();
        txtMedicamentosDR = new javax.swing.JTextArea();
        jLabel28 = new javax.swing.JLabel();
        jPanel15 = new javax.swing.JPanel();
        cmbPatologiaDR = new javax.swing.JComboBox();
        cmbMedicamentoDR = new javax.swing.JComboBox();
        jLabel19 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        btnAgregarPatologiaDR = new javax.swing.JButton();
        btnAgregarMedicamentoDR = new javax.swing.JButton();
        txtCantidadMedicamentosDR = new javax.swing.JTextField();
        btnGuardarConsulta = new javax.swing.JButton();
        btnImprimirReceta = new javax.swing.JButton();
        jScrollPane10 = new javax.swing.JScrollPane();
        txtAnexoDR = new javax.swing.JTextArea();
        pnlEvolucion = new javax.swing.JPanel();
        jLabel24 = new javax.swing.JLabel();
        pnlId16 = new javax.swing.JPanel();
        jLabel169 = new javax.swing.JLabel();
        jLabel170 = new javax.swing.JLabel();
        jLabel171 = new javax.swing.JLabel();
        jLabel172 = new javax.swing.JLabel();
        txtETonometriaOD = new javax.swing.JTextField();
        txtETonometriaOI = new javax.swing.JTextField();
        txtETonometriaHora = new javax.swing.JTextField();
        txtETonometriaFecha = new javax.swing.JTextField();
        pnlId11 = new javax.swing.JPanel();
        jLabel66 = new javax.swing.JLabel();
        jLabel67 = new javax.swing.JLabel();
        jLabel173 = new javax.swing.JLabel();
        jLabel174 = new javax.swing.JLabel();
        txtEVisionLejanaSCOD = new javax.swing.JTextField();
        txtEVisionLejanaCCOD = new javax.swing.JTextField();
        jLabel175 = new javax.swing.JLabel();
        jLabel176 = new javax.swing.JLabel();
        txtEVisionLejanaOD = new javax.swing.JTextField();
        txtEVisionLejanaOI = new javax.swing.JTextField();
        txtEVisionLejanaCCOI = new javax.swing.JTextField();
        jLabel177 = new javax.swing.JLabel();
        jLabel178 = new javax.swing.JLabel();
        txtEVisionLejanaSCOI = new javax.swing.JTextField();
        pnlId7 = new javax.swing.JPanel();
        txtEVisionCercanaSCOD = new javax.swing.JTextField();
        txtEVisionCercanaCCOI = new javax.swing.JTextField();
        txtEVisionCercanaSCOI = new javax.swing.JTextField();
        jLabel179 = new javax.swing.JLabel();
        txtEVisionCercanaCCOD = new javax.swing.JTextField();
        jLabel180 = new javax.swing.JLabel();
        jLabel181 = new javax.swing.JLabel();
        jLabel182 = new javax.swing.JLabel();
        cmbEVisionCercanaSCJ = new javax.swing.JComboBox();
        cmbEVisionCercanaCCJ = new javax.swing.JComboBox();
        pnlId17 = new javax.swing.JPanel();
        jLabel183 = new javax.swing.JLabel();
        jLabel184 = new javax.swing.JLabel();
        jLabel56 = new javax.swing.JLabel();
        txtEDistanciaESFOD = new javax.swing.JTextField();
        txtEDistanciaESFOI = new javax.swing.JTextField();
        jLabel57 = new javax.swing.JLabel();
        jLabel58 = new javax.swing.JLabel();
        jLabel59 = new javax.swing.JLabel();
        jLabel185 = new javax.swing.JLabel();
        jLabel186 = new javax.swing.JLabel();
        jLabel187 = new javax.swing.JLabel();
        txtEDistanciaCILOD = new javax.swing.JTextField();
        txtEDistanciaEJEOD = new javax.swing.JTextField();
        txtEDistanciaPRISMAOD = new javax.swing.JTextField();
        txtEDistanciaDNPOD = new javax.swing.JTextField();
        txtEDistanciaDIOD = new javax.swing.JTextField();
        txtEDistanciaCILOI = new javax.swing.JTextField();
        txtEDistanciaEJEOI = new javax.swing.JTextField();
        txtEDistanciaPRISMAOI = new javax.swing.JTextField();
        txtEDistanciaDIOI = new javax.swing.JTextField();
        txtEDistanciaDNPOI = new javax.swing.JTextField();
        txtELecturaDNPOI = new javax.swing.JTextField();
        txtELecturaDNPOD = new javax.swing.JTextField();
        jLabel188 = new javax.swing.JLabel();
        jLabel189 = new javax.swing.JLabel();
        txtELecturaDIOD = new javax.swing.JTextField();
        txtELecturaDIOI = new javax.swing.JTextField();
        txtELecturaPRISMAOI = new javax.swing.JTextField();
        txtELecturaPRISMAOD = new javax.swing.JTextField();
        jLabel190 = new javax.swing.JLabel();
        jLabel191 = new javax.swing.JLabel();
        txtELecturaEJEOD = new javax.swing.JTextField();
        jLabel192 = new javax.swing.JLabel();
        txtELecturaEJEOI = new javax.swing.JTextField();
        txtELecturaCILOI = new javax.swing.JTextField();
        txtELecturaCILOD = new javax.swing.JTextField();
        jLabel193 = new javax.swing.JLabel();
        jLabel194 = new javax.swing.JLabel();
        txtELecturaESFOD = new javax.swing.JTextField();
        txtELecturaESFOI = new javax.swing.JTextField();
        jLabel195 = new javax.swing.JLabel();
        jLabel196 = new javax.swing.JLabel();
        jLabel197 = new javax.swing.JLabel();
        txtAdicionOD = new javax.swing.JTextField();
        txtAdicionOI = new javax.swing.JTextField();
        jButton3 = new javax.swing.JButton();
        pnlEvolucion1 = new javax.swing.JPanel();
        btnGuardarEvolucion = new javax.swing.JButton();
        btnImprimirEvolucion = new javax.swing.JButton();
        jPanel6 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jScrollPane12 = new javax.swing.JScrollPane();
        txtEvolucion = new javax.swing.JTextArea();
        txtFechaEvolucion = new javax.swing.JLabel();
        txtHoraEvolucion = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jLabel20 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtIndicacionesE = new javax.swing.JTextArea();
        jScrollPane3 = new javax.swing.JScrollPane();
        txtMedicamentosE = new javax.swing.JTextArea();
        jLabel21 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        btnAgregarPatologiaE = new javax.swing.JButton();
        cmbPatologiaE = new javax.swing.JComboBox();
        cmbMedicamentoE = new javax.swing.JComboBox();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        btnAgregarMedicamentoE = new javax.swing.JButton();
        txtCantidadMedicamentosE = new javax.swing.JTextField();
        pnlBotones = new javax.swing.JPanel();
        btnNewEvolucion = new javax.swing.JButton();
        btnImprimirHC = new javax.swing.JButton();
        btnNewConsulta = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        btnViewDatosPersonales = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        btnExamenes = new javax.swing.JButton();
        btnRecetaLentes = new javax.swing.JButton();
        pnlEmcabezado = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        txtEdadPacient = new javax.swing.JTextField();
        txtHora = new javax.swing.JLabel();
        jTextField8 = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        txtNumHC = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        txtFecha = new javax.swing.JLabel();
        txtNomPacient = new javax.swing.JTextField();
        txtNumConsulta = new javax.swing.JTextField();
        jLabel30 = new javax.swing.JLabel();
        btnCerrarConsulta = new javax.swing.JButton();

        jLabel49.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        jLabel49.setForeground(new java.awt.Color(0, 12, 34));
        jLabel49.setText("EVOLUCIONES");

        tblEvoluciones.setBackground(new java.awt.Color(225, 228, 248));
        tblEvoluciones.setModel(modelotblEvoluciones);
        tblEvoluciones.setToolTipText("Doble Click para Visualizar Evolucion");
        tblEvoluciones.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblEvolucionesMouseClicked(evt);
            }
        });
        jScrollPane11.setViewportView(tblEvoluciones);

        jLabel48.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        jLabel48.setForeground(new java.awt.Color(0, 12, 34));
        jLabel48.setText("CONSULTAS");

        tblConsultas.setBackground(new java.awt.Color(209, 230, 239));
        tblConsultas.setModel(modelotblConsultas);
        tblConsultas.setToolTipText("Doble Click para Visualizar Consulta");
        tblConsultas.setComponentPopupMenu(jPopupMenu1);
        tblConsultas.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblConsultasMouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(tblConsultas);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 505, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 507, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(175, 175, 175)
                .addComponent(jLabel48)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel49)
                .addGap(190, 190, 190))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel48)
                    .addComponent(jLabel49))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)
                    .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tblConsultasVisualizar.setBackground(new java.awt.Color(209, 230, 239));
        tblConsultasVisualizar.setModel(modelotblConsultasVisualizar);
        tblConsultasVisualizar.setToolTipText("Doble Click para Visualizar Consulta");
        tblConsultasVisualizar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblConsultasVisualizarMouseClicked(evt);
            }
        });
        jScrollPane13.setViewportView(tblConsultasVisualizar);

        jLabel50.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        jLabel50.setForeground(new java.awt.Color(0, 12, 34));
        jLabel50.setText("CONSULTAS (otros especialistas)");

        tblEvolucionesVisualizar.setBackground(new java.awt.Color(225, 228, 248));
        tblEvolucionesVisualizar.setModel(modelotblEvolucionesVisualizar);
        tblEvolucionesVisualizar.setToolTipText("Doble Click para Visualizar Evolucion");
        tblEvolucionesVisualizar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblEvolucionesVisualizarMouseClicked(evt);
            }
        });
        jScrollPane14.setViewportView(tblEvolucionesVisualizar);

        jLabel51.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        jLabel51.setForeground(new java.awt.Color(0, 12, 34));
        jLabel51.setText("Evoluciones (otros especialistas)");

        javax.swing.GroupLayout pnlConsultasLayout = new javax.swing.GroupLayout(pnlConsultas);
        pnlConsultas.setLayout(pnlConsultasLayout);
        pnlConsultasLayout.setHorizontalGroup(
            pnlConsultasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(pnlConsultasLayout.createSequentialGroup()
                .addGroup(pnlConsultasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlConsultasLayout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addComponent(jLabel50)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(pnlConsultasLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane13)))
                .addGap(18, 18, 18)
                .addGroup(pnlConsultasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 505, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlConsultasLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel51)
                        .addGap(114, 114, 114)))
                .addGap(21, 21, 21))
            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlConsultasLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlConsultasLayout.setVerticalGroup(
            pnlConsultasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlConsultasLayout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlConsultasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel50, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel51, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlConsultasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 108, Short.MAX_VALUE)
                    .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap(44, Short.MAX_VALUE))
        );

        mnConsultaVisualizacion.setText("Habilitar Visualizacion para esṕecialistas");
        mnConsultaVisualizacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnConsultaVisualizacionActionPerformed(evt);
            }
        });
        jPopupMenu1.add(mnConsultaVisualizacion);

        setClosable(true);
        setTitle("HISTORIA CLINICA");
        setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/PatientMale.png"))); // NOI18N
        setVisible(true);

        tpnlPaneles.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        pnlId.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Motivo de Consulta", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, null, null));

        cmbMotivoConsulta.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        btnAgregarMotivoConsulta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/add.png"))); // NOI18N
        btnAgregarMotivoConsulta.setToolTipText("Nuevo Motivo Consulta");
        btnAgregarMotivoConsulta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarMotivoConsultaActionPerformed(evt);
            }
        });

        btnAddMotivoConsul.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/accept.png"))); // NOI18N
        btnAddMotivoConsul.setToolTipText(" APP");
        btnAddMotivoConsul.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddMotivoConsulActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlIdLayout = new javax.swing.GroupLayout(pnlId);
        pnlId.setLayout(pnlIdLayout);
        pnlIdLayout.setHorizontalGroup(
            pnlIdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIdLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlIdLayout.createSequentialGroup()
                        .addComponent(cmbMotivoConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 412, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(8, 8, 8)
                        .addComponent(btnAddMotivoConsul, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnAgregarMotivoConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 524, Short.MAX_VALUE))
                    .addComponent(txtMotivoConsulta))
                .addContainerGap())
        );
        pnlIdLayout.setVerticalGroup(
            pnlIdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlIdLayout.createSequentialGroup()
                .addGroup(pnlIdLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cmbMotivoConsulta, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)
                    .addComponent(btnAgregarMotivoConsulta, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnAddMotivoConsul, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtMotivoConsulta))
        );

        pnlId1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Enfermedad Actual", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, null, null));

        txtEnfermedadActual.setColumns(20);
        txtEnfermedadActual.setLineWrap(true);
        txtEnfermedadActual.setRows(5);
        jScrollPane5.setViewportView(txtEnfermedadActual);

        javax.swing.GroupLayout pnlId1Layout = new javax.swing.GroupLayout(pnlId1);
        pnlId1.setLayout(pnlId1Layout);
        pnlId1Layout.setHorizontalGroup(
            pnlId1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane5)
                .addContainerGap())
        );
        pnlId1Layout.setVerticalGroup(
            pnlId1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE)
        );

        pnlId2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Antecedentes", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, null, null));

        jPanel4.setMaximumSize(new java.awt.Dimension(500, 232));
        jPanel4.setMinimumSize(new java.awt.Dimension(500, 232));

        jLabel16.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel16.setText("Personales");

        txtAntecedentPerson.setColumns(20);
        txtAntecedentPerson.setLineWrap(true);
        txtAntecedentPerson.setRows(5);
        jScrollPane6.setViewportView(txtAntecedentPerson);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 476, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jLabel16)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel5.setMinimumSize(new java.awt.Dimension(500, 232));

        jLabel23.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel23.setText("Familiares");

        txtAntecedentFami.setColumns(20);
        txtAntecedentFami.setLineWrap(true);
        txtAntecedentFami.setRows(5);
        jScrollPane7.setViewportView(txtAntecedentFami);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel23)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jScrollPane7))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(jLabel23)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel97.setFont(new java.awt.Font("DejaVu Sans", 1, 12)); // NOI18N
        jLabel97.setText("Oculares");

        txtOculares.setColumns(20);
        txtOculares.setRows(5);
        jScrollPane26.setViewportView(txtOculares);

        javax.swing.GroupLayout pnlId2Layout = new javax.swing.GroupLayout(pnlId2);
        pnlId2.setLayout(pnlId2Layout);
        pnlId2Layout.setHorizontalGroup(
            pnlId2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId2Layout.createSequentialGroup()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(pnlId2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId2Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 75, Short.MAX_VALUE)
                        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 479, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlId2Layout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addComponent(jLabel97)
                        .addGap(0, 0, Short.MAX_VALUE))))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane26, javax.swing.GroupLayout.PREFERRED_SIZE, 561, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(242, 242, 242))
        );
        pnlId2Layout.setVerticalGroup(
            pnlId2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId2Layout.createSequentialGroup()
                .addGroup(pnlId2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId2Layout.createSequentialGroup()
                        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel97))
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane26, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(16, 16, 16))
        );

        javax.swing.GroupLayout pnlAnamnesisLayout = new javax.swing.GroupLayout(pnlAnamnesis);
        pnlAnamnesis.setLayout(pnlAnamnesisLayout);
        pnlAnamnesisLayout.setHorizontalGroup(
            pnlAnamnesisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAnamnesisLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlAnamnesisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(pnlId1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlId, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlId2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlAnamnesisLayout.setVerticalGroup(
            pnlAnamnesisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlAnamnesisLayout.createSequentialGroup()
                .addComponent(pnlId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlId1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlId2, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        tpnlPaneles.addTab("Anamnesis", pnlAnamnesis);

        pnlId6.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Vision Cercana", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel74.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel74.setForeground(new java.awt.Color(28, 37, 82));
        jLabel74.setText("S.C:");

        jLabel75.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel75.setForeground(new java.awt.Color(28, 37, 82));
        jLabel75.setText("C.C:");

        jLabel73.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel73.setText("O.D");

        jLabel80.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel80.setText("O.I");

        comboSC.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "J1", "J2", "J3", "J4", "J5", "J6", "J7" }));
        comboSC.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboSCActionPerformed(evt);
            }
        });

        comboCC.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "J1", "J2", "J3", "J4", "J5", "J6", "J7" }));

        javax.swing.GroupLayout pnlId6Layout = new javax.swing.GroupLayout(pnlId6);
        pnlId6.setLayout(pnlId6Layout);
        pnlId6Layout.setHorizontalGroup(
            pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId6Layout.createSequentialGroup()
                .addGap(76, 76, 76)
                .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId6Layout.createSequentialGroup()
                        .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel75)
                            .addComponent(jLabel74))
                        .addGap(36, 36, 36)
                        .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtVisionCercanaCCOD)
                            .addComponent(txtVisionCercanaSCOD, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlId6Layout.createSequentialGroup()
                        .addGap(79, 79, 79)
                        .addComponent(jLabel73)))
                .addGap(73, 73, 73)
                .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId6Layout.createSequentialGroup()
                        .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtVisionCercanaCCOI)
                            .addComponent(txtVisionCercanaSCOI, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(31, 31, 31)
                        .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(comboSC, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(comboCC, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlId6Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(jLabel80)))
                .addContainerGap(89, Short.MAX_VALUE))
        );
        pnlId6Layout.setVerticalGroup(
            pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId6Layout.createSequentialGroup()
                .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel73)
                    .addComponent(jLabel80))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId6Layout.createSequentialGroup()
                        .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVisionCercanaSCOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(comboSC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVisionCercanaCCOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(comboCC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlId6Layout.createSequentialGroup()
                        .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtVisionCercanaSCOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel74, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVisionCercanaCCOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel75))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlId8.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Vision Lejana", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel60.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel60.setForeground(new java.awt.Color(28, 37, 82));
        jLabel60.setText("S.C:");

        jLabel61.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel61.setForeground(new java.awt.Color(28, 37, 82));
        jLabel61.setText("C.C:");

        jLabel62.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel62.setText("O.D");

        jLabel63.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel63.setText("O.I");

        jLabel64.setFont(new java.awt.Font("Courier 10 Pitch", 1, 18)); // NOI18N
        jLabel64.setText("20/");

        jLabel65.setFont(new java.awt.Font("Courier 10 Pitch", 1, 18)); // NOI18N
        jLabel65.setText("20/");

        jLabel93.setFont(new java.awt.Font("Courier 10 Pitch", 1, 18)); // NOI18N
        jLabel93.setText("20/");

        jLabel108.setFont(new java.awt.Font("Courier 10 Pitch", 1, 18)); // NOI18N
        jLabel108.setText("20/");

        javax.swing.GroupLayout pnlId8Layout = new javax.swing.GroupLayout(pnlId8);
        pnlId8.setLayout(pnlId8Layout);
        pnlId8Layout.setHorizontalGroup(
            pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId8Layout.createSequentialGroup()
                .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId8Layout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId8Layout.createSequentialGroup()
                                .addGap(112, 112, 112)
                                .addComponent(jLabel62))
                            .addGroup(pnlId8Layout.createSequentialGroup()
                                .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel61)
                                    .addComponent(jLabel60))
                                .addGap(63, 63, 63)
                                .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlId8Layout.createSequentialGroup()
                                        .addComponent(jLabel65)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtVisionLejanaCCOD, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(pnlId8Layout.createSequentialGroup()
                                        .addComponent(jLabel64)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtVisionLejanaSCOD, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                    .addGroup(pnlId8Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(txtComentOD, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
                .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId8Layout.createSequentialGroup()
                        .addComponent(jLabel63)
                        .addGap(98, 98, 98))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId8Layout.createSequentialGroup()
                        .addComponent(txtComentOI, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(20, 20, 20))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId8Layout.createSequentialGroup()
                        .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId8Layout.createSequentialGroup()
                                .addComponent(jLabel93)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtVisionLejanaCCOI, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlId8Layout.createSequentialGroup()
                                .addComponent(jLabel108)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtVisionLejanaSCOI, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(53, 53, 53))))
        );
        pnlId8Layout.setVerticalGroup(
            pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId8Layout.createSequentialGroup()
                .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel62)
                    .addComponent(jLabel63))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlId8Layout.createSequentialGroup()
                        .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(txtVisionLejanaSCOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel64))
                            .addComponent(jLabel60, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVisionLejanaCCOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel65)
                            .addComponent(jLabel61)))
                    .addGroup(pnlId8Layout.createSequentialGroup()
                        .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVisionLejanaSCOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel108))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtVisionLejanaCCOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel93))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
                .addGroup(pnlId8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtComentOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtComentOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlId9.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Autorefractometro", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel70.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel70.setText("O.D");

        jLabel71.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel71.setText("O.I");

        javax.swing.GroupLayout pnlId9Layout = new javax.swing.GroupLayout(pnlId9);
        pnlId9.setLayout(pnlId9Layout);
        pnlId9Layout.setHorizontalGroup(
            pnlId9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId9Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlId9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel70)
                    .addComponent(jLabel71))
                .addGap(18, 18, 18)
                .addGroup(pnlId9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtAutorefracOI, javax.swing.GroupLayout.PREFERRED_SIZE, 926, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtAutorefracOD, javax.swing.GroupLayout.PREFERRED_SIZE, 926, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        pnlId9Layout.setVerticalGroup(
            pnlId9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId9Layout.createSequentialGroup()
                .addGroup(pnlId9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel70)
                    .addComponent(txtAutorefracOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel71)
                    .addComponent(txtAutorefracOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        pnlId10.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "RP FINAL", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel72.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel72.setText("O.D");

        jLabel76.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel76.setText("O.I");

        jLabel52.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel52.setForeground(new java.awt.Color(26, 64, 129));
        jLabel52.setText("DISTANCIA");

        jLabel53.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel53.setText("ESF.");

        jLabel54.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel54.setText("CIL.");

        jLabel55.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel55.setText("EJE.");

        jLabel68.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel68.setText("PRISMA");

        jLabel69.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel69.setText("D.I");

        jLabel77.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel77.setText("DNP");

        jLabel78.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel78.setText("DNP");

        jLabel79.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel79.setText("D.I");

        jLabel81.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel81.setText("PRISMA");

        jLabel82.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel82.setForeground(new java.awt.Color(26, 64, 129));
        jLabel82.setText("LECTURA");

        jLabel83.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel83.setText("EJE.");

        jLabel84.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel84.setText("CIL.");

        jLabel85.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel85.setText("ESF.");

        jLabel86.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel86.setText("O.I");

        jLabel87.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel87.setText("O.D");

        jLabel88.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel88.setForeground(new java.awt.Color(26, 64, 129));
        jLabel88.setText("ADICION");

        javax.swing.GroupLayout pnlId10Layout = new javax.swing.GroupLayout(pnlId10);
        pnlId10.setLayout(pnlId10Layout);
        pnlId10Layout.setHorizontalGroup(
            pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId10Layout.createSequentialGroup()
                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId10Layout.createSequentialGroup()
                        .addGap(200, 200, 200)
                        .addComponent(jLabel52))
                    .addGroup(pnlId10Layout.createSequentialGroup()
                        .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel76)
                            .addComponent(jLabel72))
                        .addGap(18, 18, 18)
                        .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId10Layout.createSequentialGroup()
                                .addComponent(txtDistanciaEsfOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtDistanciaCilOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtDistanciaEjeOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtDistanciaPrismaOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtDistanciaDIOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtDistanciaDnpOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlId10Layout.createSequentialGroup()
                                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(pnlId10Layout.createSequentialGroup()
                                        .addGap(12, 12, 12)
                                        .addComponent(jLabel53)
                                        .addGap(42, 42, 42)
                                        .addComponent(jLabel54)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel55)
                                        .addGap(26, 26, 26))
                                    .addGroup(pnlId10Layout.createSequentialGroup()
                                        .addComponent(txtDistanciaEsfOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(txtDistanciaCilOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtDistanciaEjeOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlId10Layout.createSequentialGroup()
                                        .addComponent(jLabel68)
                                        .addGap(27, 27, 27)
                                        .addComponent(jLabel69)
                                        .addGap(35, 35, 35)
                                        .addComponent(jLabel77))
                                    .addGroup(pnlId10Layout.createSequentialGroup()
                                        .addComponent(txtDistanciaPrismaOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtDistanciaDiOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(12, 12, 12)
                                        .addComponent(txtDistanciaDnpOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtAdicOI, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtAdicOD, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel88))
                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId10Layout.createSequentialGroup()
                        .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel86)
                            .addComponent(jLabel87))
                        .addGap(18, 18, 18)
                        .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId10Layout.createSequentialGroup()
                                .addComponent(txtLecturaEsfOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtLecturaCilOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtLecturaEjeOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextField34, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField33, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextField30, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlId10Layout.createSequentialGroup()
                                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(pnlId10Layout.createSequentialGroup()
                                        .addGap(12, 12, 12)
                                        .addComponent(jLabel85)
                                        .addGap(42, 42, 42)
                                        .addComponent(jLabel84)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel83)
                                        .addGap(26, 26, 26))
                                    .addGroup(pnlId10Layout.createSequentialGroup()
                                        .addComponent(txtLecturaEsfOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(txtLecturaCilOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtLecturaEjeOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlId10Layout.createSequentialGroup()
                                        .addComponent(jTextField35, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jTextField32, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(12, 12, 12)
                                        .addComponent(jTextField31, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(pnlId10Layout.createSequentialGroup()
                                        .addComponent(jLabel81)
                                        .addGap(27, 27, 27)
                                        .addComponent(jLabel79)
                                        .addGap(35, 35, 35)
                                        .addComponent(jLabel78))))))
                    .addGroup(pnlId10Layout.createSequentialGroup()
                        .addGap(200, 200, 200)
                        .addComponent(jLabel82))))
        );
        pnlId10Layout.setVerticalGroup(
            pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId10Layout.createSequentialGroup()
                .addComponent(jLabel52)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel68)
                    .addComponent(jLabel69)
                    .addComponent(jLabel77)
                    .addComponent(jLabel55)
                    .addComponent(jLabel54)
                    .addComponent(jLabel53))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtDistanciaEsfOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel72)
                    .addComponent(txtDistanciaCilOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDistanciaEjeOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDistanciaPrismaOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDistanciaDnpOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDistanciaDiOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel76)
                    .addComponent(txtDistanciaEsfOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDistanciaCilOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDistanciaEjeOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDistanciaPrismaOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDistanciaDIOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDistanciaDnpOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId10Layout.createSequentialGroup()
                .addComponent(jLabel88)
                .addGap(29, 29, 29)
                .addComponent(txtAdicOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txtAdicOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId10Layout.createSequentialGroup()
                .addComponent(jLabel82)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel81)
                    .addComponent(jLabel79)
                    .addComponent(jLabel78)
                    .addComponent(jLabel83)
                    .addComponent(jLabel84)
                    .addComponent(jLabel85))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtLecturaEsfOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel87)
                    .addComponent(txtLecturaCilOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtLecturaEjeOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlId10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel86)
                    .addComponent(txtLecturaEsfOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtLecturaCilOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtLecturaEjeOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField34, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jLabel89.setFont(new java.awt.Font("DejaVu Sans", 1, 12)); // NOI18N
        jLabel89.setText("Vision de Colores:");

        jLabel90.setFont(new java.awt.Font("DejaVu Sans", 1, 12)); // NOI18N
        jLabel90.setText("Vision de Profundidad:");

        txtVisionColores.setText("Normal");
        txtVisionColores.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtVisionColoresMouseClicked(evt);
            }
        });

        txtVisionProfundidad.setText("Normal");
        txtVisionProfundidad.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtVisionProfundidadMouseClicked(evt);
            }
        });

        btnRecetaDeLentes.setFont(new java.awt.Font("DejaVu Sans", 0, 11)); // NOI18N
        btnRecetaDeLentes.setText("Receta de Lentes");
        btnRecetaDeLentes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRecetaDeLentesActionPerformed(evt);
            }
        });

        jLabel110.setFont(new java.awt.Font("DejaVu Sans", 1, 12)); // NOI18N
        jLabel110.setText("Sensibilidad Contraste:");

        txtSensibContraste.setText("Normal");
        txtSensibContraste.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtSensibContrasteMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout pnlRefraccionLayout = new javax.swing.GroupLayout(pnlRefraccion);
        pnlRefraccion.setLayout(pnlRefraccionLayout);
        pnlRefraccionLayout.setHorizontalGroup(
            pnlRefraccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlRefraccionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlRefraccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlId9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(pnlRefraccionLayout.createSequentialGroup()
                        .addComponent(pnlId10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnRecetaDeLentes, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlRefraccionLayout.createSequentialGroup()
                        .addGroup(pnlRefraccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(pnlRefraccionLayout.createSequentialGroup()
                                .addComponent(jLabel110)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtSensibContraste))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlRefraccionLayout.createSequentialGroup()
                                .addGroup(pnlRefraccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnlRefraccionLayout.createSequentialGroup()
                                        .addComponent(jLabel89)
                                        .addGap(18, 18, 18)
                                        .addComponent(txtVisionColores))
                                    .addComponent(pnlId8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(pnlRefraccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(pnlRefraccionLayout.createSequentialGroup()
                                        .addComponent(jLabel90)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(txtVisionProfundidad, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(pnlId6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(16, 16, 16)))
                .addContainerGap())
        );
        pnlRefraccionLayout.setVerticalGroup(
            pnlRefraccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlRefraccionLayout.createSequentialGroup()
                .addGroup(pnlRefraccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlId8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnlId6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlRefraccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel89)
                    .addComponent(txtVisionColores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel90)
                    .addComponent(txtVisionProfundidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlRefraccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSensibContraste, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel110))
                .addGap(12, 12, 12)
                .addComponent(pnlId9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(pnlRefraccionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlRefraccionLayout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(pnlId10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlRefraccionLayout.createSequentialGroup()
                        .addGap(64, 64, 64)
                        .addComponent(btnRecetaDeLentes, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(514, 514, 514))
        );

        tpnlPaneles.addTab("Refraccion", pnlRefraccion);

        pnlId12.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Motilidad Ocular", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel99.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel99.setText("O.D");

        jLabel100.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel100.setText("O.I");

        motilidadOcularOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                motilidadOcularOIMouseClicked(evt);
            }
        });

        motilidadOcularOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                motilidadOcularODMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout pnlId12Layout = new javax.swing.GroupLayout(pnlId12);
        pnlId12.setLayout(pnlId12Layout);
        pnlId12Layout.setHorizontalGroup(
            pnlId12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId12Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlId12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel99)
                    .addComponent(jLabel100))
                .addGap(18, 18, 18)
                .addGroup(pnlId12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(motilidadOcularOI)
                    .addComponent(motilidadOcularOD, javax.swing.GroupLayout.DEFAULT_SIZE, 573, Short.MAX_VALUE))
                .addGap(353, 353, 353))
        );
        pnlId12Layout.setVerticalGroup(
            pnlId12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId12Layout.createSequentialGroup()
                .addGroup(pnlId12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel99)
                    .addComponent(motilidadOcularOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel100)
                    .addComponent(motilidadOcularOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(10, Short.MAX_VALUE))
        );

        pnlId13.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Tonometria", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel95.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel95.setText("O.D");

        jLabel96.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel96.setText("O.I");

        jLabel103.setText("Hora");

        jLabel104.setText("Fecha");

        javax.swing.GroupLayout pnlId13Layout = new javax.swing.GroupLayout(pnlId13);
        pnlId13.setLayout(pnlId13Layout);
        pnlId13Layout.setHorizontalGroup(
            pnlId13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId13Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlId13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel95, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel96, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tonometriaOD, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tonometriaOI, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(101, 101, 101)
                .addComponent(jLabel103)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 57, Short.MAX_VALUE)
                .addComponent(jLabel104)
                .addGap(29, 29, 29))
        );
        pnlId13Layout.setVerticalGroup(
            pnlId13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId13Layout.createSequentialGroup()
                .addGroup(pnlId13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel103)
                        .addComponent(jLabel104))
                    .addGroup(pnlId13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId13Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(tonometriaOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(pnlId13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(tonometriaOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel96)))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId13Layout.createSequentialGroup()
                            .addComponent(jLabel95)
                            .addGap(37, 37, 37))))
                .addGap(13, 13, 13))
        );

        pnlId14.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Segmento Anterior", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, null, null));
        pnlId14.setLayout(null);

        jLabel109.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel109.setText("Conjuntiva");
        pnlId14.add(jLabel109);
        jLabel109.setBounds(10, 20, 92, 19);

        camaraAnteriorOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                camaraAnteriorOIMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                camaraAnteriorOIMouseEntered(evt);
            }
        });
        pnlId14.add(camaraAnteriorOI);
        camaraAnteriorOI.setBounds(660, 80, 419, 27);

        jLabel101.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel101.setText("Camara Anterior");
        pnlId14.add(jLabel101);
        jLabel101.setBounds(10, 80, 145, 19);

        camaraAnteriorOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                camaraAnteriorODMouseClicked(evt);
            }
        });
        camaraAnteriorOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                camaraAnteriorODActionPerformed(evt);
            }
        });
        pnlId14.add(camaraAnteriorOD);
        camaraAnteriorOD.setBounds(230, 80, 410, 27);

        corneaOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                corneaODMouseClicked(evt);
            }
        });
        corneaOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                corneaODActionPerformed(evt);
            }
        });
        pnlId14.add(corneaOD);
        corneaOD.setBounds(230, 50, 410, 27);

        jLabel102.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel102.setText("Cornea");
        pnlId14.add(jLabel102);
        jLabel102.setBounds(10, 50, 63, 19);

        corneaOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                corneaOIMouseClicked(evt);
            }
        });
        pnlId14.add(corneaOI);
        corneaOI.setBounds(660, 50, 417, 27);

        conjuntivaOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                conjuntivaOIMouseClicked(evt);
            }
        });
        conjuntivaOI.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                conjuntivaOIActionPerformed(evt);
            }
        });
        pnlId14.add(conjuntivaOI);
        conjuntivaOI.setBounds(660, 20, 417, 27);

        conjuntivaOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                conjuntivaODMouseClicked(evt);
            }
        });
        conjuntivaOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                conjuntivaODActionPerformed(evt);
            }
        });
        pnlId14.add(conjuntivaOD);
        conjuntivaOD.setBounds(230, 20, 410, 27);

        pupilaOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pupilaOIMouseClicked(evt);
            }
        });
        pupilaOI.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pupilaOIActionPerformed(evt);
            }
        });
        pnlId14.add(pupilaOI);
        pupilaOI.setBounds(660, 110, 419, 27);

        pupilaOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pupilaODMouseClicked(evt);
            }
        });
        pupilaOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pupilaODActionPerformed(evt);
            }
        });
        pnlId14.add(pupilaOD);
        pupilaOD.setBounds(230, 110, 410, 27);

        jLabel111.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel111.setText("Pupila");
        pnlId14.add(jLabel111);
        jLabel111.setBounds(10, 120, 52, 19);

        irisOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                irisOIMouseClicked(evt);
            }
        });
        irisOI.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                irisOIActionPerformed(evt);
            }
        });
        pnlId14.add(irisOI);
        irisOI.setBounds(660, 140, 419, 27);

        irisOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                irisODMouseClicked(evt);
            }
        });
        irisOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                irisODActionPerformed(evt);
            }
        });
        pnlId14.add(irisOD);
        irisOD.setBounds(230, 140, 411, 27);

        jLabel112.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel112.setText("Iris");
        pnlId14.add(jLabel112);
        jLabel112.setBounds(10, 150, 28, 19);

        jLabel114.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel114.setText("Angulo Irido Corneal");
        pnlId14.add(jLabel114);
        jLabel114.setBounds(10, 180, 179, 19);

        anguloIridoCornealOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                anguloIridoCornealOIMouseClicked(evt);
            }
        });
        pnlId14.add(anguloIridoCornealOI);
        anguloIridoCornealOI.setBounds(660, 170, 419, 27);

        anguloIridoCornealOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                anguloIridoCornealODMouseClicked(evt);
            }
        });
        anguloIridoCornealOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                anguloIridoCornealODActionPerformed(evt);
            }
        });
        pnlId14.add(anguloIridoCornealOD);
        anguloIridoCornealOD.setBounds(230, 170, 411, 27);

        cristalinoOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cristalinoODMouseClicked(evt);
            }
        });
        cristalinoOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cristalinoODActionPerformed(evt);
            }
        });
        pnlId14.add(cristalinoOD);
        cristalinoOD.setBounds(230, 200, 411, 27);

        cristalinoOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cristalinoOIMouseClicked(evt);
            }
        });
        pnlId14.add(cristalinoOI);
        cristalinoOI.setBounds(660, 200, 419, 27);

        jLabel115.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel115.setText("Cristalino");
        pnlId14.add(jLabel115);
        jLabel115.setBounds(10, 210, 82, 19);

        jPanel17.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Anexos Oculares", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(27, 27, 87)));
        jPanel17.setLayout(null);

        viasLacrimalesOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                viasLacrimalesODMouseClicked(evt);
            }
        });
        jPanel17.add(viasLacrimalesOD);
        viasLacrimalesOD.setBounds(210, 60, 420, 27);

        jLabel106.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel106.setText("Vias Lacrimales");
        jPanel17.add(jLabel106);
        jLabel106.setBounds(20, 60, 160, 27);

        jLabel92.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel92.setForeground(new java.awt.Color(14, 41, 169));
        jLabel92.setText("O.I");
        jPanel17.add(jLabel92);
        jLabel92.setBounds(820, 10, 23, 20);

        jLabel107.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel107.setText("Parpados y Pestañas");
        jPanel17.add(jLabel107);
        jLabel107.setBounds(20, 30, 160, 27);

        parpadosPestanasOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                parpadosPestanasODMouseClicked(evt);
            }
        });
        parpadosPestanasOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                parpadosPestanasODActionPerformed(evt);
            }
        });
        jPanel17.add(parpadosPestanasOD);
        parpadosPestanasOD.setBounds(210, 30, 420, 27);

        parpadosPestanasOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                parpadosPestanasOIMouseClicked(evt);
            }
        });
        jPanel17.add(parpadosPestanasOI);
        parpadosPestanasOI.setBounds(640, 30, 420, 27);

        viasLacrimalesOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                viasLacrimalesOIMouseClicked(evt);
            }
        });
        jPanel17.add(viasLacrimalesOI);
        viasLacrimalesOI.setBounds(640, 60, 420, 27);

        jLabel168.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel168.setForeground(new java.awt.Color(14, 41, 169));
        jLabel168.setText("O.D");
        jPanel17.add(jLabel168);
        jLabel168.setBounds(400, 10, 28, 20);

        javax.swing.GroupLayout pnlSegmentoAnteriorLayout = new javax.swing.GroupLayout(pnlSegmentoAnterior);
        pnlSegmentoAnterior.setLayout(pnlSegmentoAnteriorLayout);
        pnlSegmentoAnteriorLayout.setHorizontalGroup(
            pnlSegmentoAnteriorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlSegmentoAnteriorLayout.createSequentialGroup()
                .addGroup(pnlSegmentoAnteriorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(pnlId14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(pnlSegmentoAnteriorLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(pnlSegmentoAnteriorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlSegmentoAnteriorLayout.createSequentialGroup()
                                .addComponent(pnlId12, javax.swing.GroupLayout.PREFERRED_SIZE, 677, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(pnlId13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, 1107, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlSegmentoAnteriorLayout.setVerticalGroup(
            pnlSegmentoAnteriorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlSegmentoAnteriorLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlSegmentoAnteriorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlSegmentoAnteriorLayout.createSequentialGroup()
                        .addComponent(pnlId13, javax.swing.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE)
                        .addGap(2, 2, 2))
                    .addComponent(pnlId12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(pnlId14, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18))
        );

        tpnlPaneles.addTab("Segmento Anterior", pnlSegmentoAnterior);

        jPanel16.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Procedimientos Especiales", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(27, 27, 87)));
        jPanel16.setLayout(null);

        jLabel91.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel91.setForeground(new java.awt.Color(14, 41, 169));
        jLabel91.setText("O.I");
        jPanel16.add(jLabel91);
        jLabel91.setBounds(870, 10, 23, 20);

        jLabel116.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel116.setText("Campos Visuales");
        jPanel16.add(jLabel116);
        jLabel116.setBounds(70, 50, 130, 30);

        jLabel94.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel94.setForeground(new java.awt.Color(14, 41, 169));
        jLabel94.setText("O.D");
        jPanel16.add(jLabel94);
        jLabel94.setBounds(430, 10, 28, 20);

        jPanel18.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Anexos Oculares", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(27, 27, 87)));
        jPanel18.setLayout(null);
        jPanel18.add(jTextField80);
        jTextField80.setBounds(220, 60, 390, 27);

        jLabel118.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel118.setForeground(new java.awt.Color(14, 54, 122));
        jLabel118.setText("Vasos");
        jPanel18.add(jLabel118);
        jLabel118.setBounds(100, 120, 50, 30);

        jLabel119.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel119.setForeground(new java.awt.Color(14, 41, 169));
        jLabel119.setText("O.I");
        jPanel18.add(jLabel119);
        jLabel119.setBounds(790, 10, 23, 20);

        jLabel120.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel120.setText("Vitreo");
        jPanel18.add(jLabel120);
        jLabel120.setBounds(100, 30, 60, 27);

        jTextField81.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField81ActionPerformed(evt);
            }
        });
        jPanel18.add(jTextField81);
        jTextField81.setBounds(220, 30, 390, 27);

        jLabel121.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel121.setForeground(new java.awt.Color(14, 54, 122));
        jLabel121.setText("Disco Optico");
        jPanel18.add(jLabel121);
        jLabel121.setBounds(100, 60, 110, 30);

        jLabel122.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel122.setText("RETINA");
        jPanel18.add(jLabel122);
        jLabel122.setBounds(10, 90, 60, 30);
        jPanel18.add(jTextField82);
        jTextField82.setBounds(220, 120, 390, 27);
        jPanel18.add(jTextField83);
        jTextField83.setBounds(220, 90, 390, 27);

        jLabel123.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel123.setForeground(new java.awt.Color(14, 41, 169));
        jLabel123.setText("O.D");
        jPanel18.add(jLabel123);
        jLabel123.setBounds(380, 10, 28, 20);
        jPanel18.add(jTextField84);
        jTextField84.setBounds(620, 30, 390, 27);
        jPanel18.add(jTextField85);
        jTextField85.setBounds(620, 60, 390, 27);
        jPanel18.add(jTextField86);
        jTextField86.setBounds(620, 90, 390, 27);
        jPanel18.add(jTextField87);
        jTextField87.setBounds(620, 120, 390, 27);

        jLabel124.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel124.setForeground(new java.awt.Color(14, 54, 122));
        jLabel124.setText("Macula");
        jPanel18.add(jLabel124);
        jLabel124.setBounds(100, 90, 80, 30);

        jPanel16.add(jPanel18);
        jPanel18.setBounds(0, 0, 0, 0);

        jPanel19.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Anexos Oculares", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(27, 27, 87)));
        jPanel19.setLayout(null);
        jPanel19.add(jTextField88);
        jTextField88.setBounds(220, 60, 390, 27);

        jLabel125.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel125.setForeground(new java.awt.Color(14, 54, 122));
        jLabel125.setText("Vasos");
        jPanel19.add(jLabel125);
        jLabel125.setBounds(100, 120, 50, 30);

        jLabel126.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel126.setForeground(new java.awt.Color(14, 41, 169));
        jLabel126.setText("O.I");
        jPanel19.add(jLabel126);
        jLabel126.setBounds(790, 10, 23, 20);

        jLabel127.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel127.setText("Vitreo");
        jPanel19.add(jLabel127);
        jLabel127.setBounds(100, 30, 60, 27);

        jTextField89.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField89ActionPerformed(evt);
            }
        });
        jPanel19.add(jTextField89);
        jTextField89.setBounds(220, 30, 390, 27);

        jLabel128.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel128.setForeground(new java.awt.Color(14, 54, 122));
        jLabel128.setText("Disco Optico");
        jPanel19.add(jLabel128);
        jLabel128.setBounds(100, 60, 110, 30);

        jLabel129.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel129.setText("RETINA");
        jPanel19.add(jLabel129);
        jLabel129.setBounds(10, 90, 60, 30);
        jPanel19.add(jTextField90);
        jTextField90.setBounds(220, 120, 390, 27);
        jPanel19.add(jTextField91);
        jTextField91.setBounds(220, 90, 390, 27);

        jLabel130.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel130.setForeground(new java.awt.Color(14, 41, 169));
        jLabel130.setText("O.D");
        jPanel19.add(jLabel130);
        jLabel130.setBounds(380, 10, 28, 20);
        jPanel19.add(jTextField92);
        jTextField92.setBounds(620, 30, 390, 27);
        jPanel19.add(jTextField93);
        jTextField93.setBounds(620, 60, 390, 27);
        jPanel19.add(jTextField94);
        jTextField94.setBounds(620, 90, 390, 27);
        jPanel19.add(jTextField95);
        jTextField95.setBounds(620, 120, 390, 27);

        jLabel131.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel131.setForeground(new java.awt.Color(14, 54, 122));
        jLabel131.setText("Macula");
        jPanel19.add(jLabel131);
        jLabel131.setBounds(100, 90, 80, 30);

        jPanel20.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Anexos Oculares", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(27, 27, 87)));
        jPanel20.setLayout(null);
        jPanel20.add(jTextField96);
        jTextField96.setBounds(220, 60, 390, 27);

        jLabel132.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel132.setForeground(new java.awt.Color(14, 54, 122));
        jLabel132.setText("Vasos");
        jPanel20.add(jLabel132);
        jLabel132.setBounds(100, 120, 50, 30);

        jLabel133.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel133.setForeground(new java.awt.Color(14, 41, 169));
        jLabel133.setText("O.I");
        jPanel20.add(jLabel133);
        jLabel133.setBounds(790, 10, 23, 20);

        jLabel134.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel134.setText("Vitreo");
        jPanel20.add(jLabel134);
        jLabel134.setBounds(100, 30, 60, 27);

        jTextField97.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField97ActionPerformed(evt);
            }
        });
        jPanel20.add(jTextField97);
        jTextField97.setBounds(220, 30, 390, 27);

        jLabel135.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel135.setForeground(new java.awt.Color(14, 54, 122));
        jLabel135.setText("Disco Optico");
        jPanel20.add(jLabel135);
        jLabel135.setBounds(100, 60, 110, 30);

        jLabel136.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel136.setText("RETINA");
        jPanel20.add(jLabel136);
        jLabel136.setBounds(10, 90, 60, 30);
        jPanel20.add(jTextField98);
        jTextField98.setBounds(220, 120, 390, 27);
        jPanel20.add(jTextField99);
        jTextField99.setBounds(220, 90, 390, 27);

        jLabel137.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel137.setForeground(new java.awt.Color(14, 41, 169));
        jLabel137.setText("O.D");
        jPanel20.add(jLabel137);
        jLabel137.setBounds(380, 10, 28, 20);
        jPanel20.add(jTextField100);
        jTextField100.setBounds(620, 30, 390, 27);
        jPanel20.add(jTextField101);
        jTextField101.setBounds(620, 60, 390, 27);
        jPanel20.add(jTextField102);
        jTextField102.setBounds(620, 90, 390, 27);
        jPanel20.add(jTextField103);
        jTextField103.setBounds(620, 120, 390, 27);

        jLabel138.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel138.setForeground(new java.awt.Color(14, 54, 122));
        jLabel138.setText("Macula");
        jPanel20.add(jLabel138);
        jLabel138.setBounds(100, 90, 80, 30);

        jPanel19.add(jPanel20);
        jPanel20.setBounds(0, 0, 0, 0);

        jPanel16.add(jPanel19);
        jPanel19.setBounds(0, 0, 0, 0);

        txtCamposVisualesOI.setColumns(20);
        txtCamposVisualesOI.setLineWrap(true);
        txtCamposVisualesOI.setRows(5);
        jScrollPane15.setViewportView(txtCamposVisualesOI);

        jPanel16.add(jScrollPane15);
        jScrollPane15.setBounds(680, 40, 370, 60);

        txtCamposVisualesOD.setColumns(20);
        txtCamposVisualesOD.setLineWrap(true);
        txtCamposVisualesOD.setRows(5);
        jScrollPane16.setViewportView(txtCamposVisualesOD);

        jPanel16.add(jScrollPane16);
        jScrollPane16.setBounds(230, 40, 430, 60);

        pnlId15.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Tonometria", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel98.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel98.setText("O.D");

        jLabel105.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel105.setText("O.I");

        jLabel113.setText("Hora");

        jLabel117.setText("Fecha");

        txtTonometriaHora.setEditable(false);

        txtTonometriaFecha.setEditable(false);

        javax.swing.GroupLayout pnlId15Layout = new javax.swing.GroupLayout(pnlId15);
        pnlId15.setLayout(pnlId15Layout);
        pnlId15Layout.setHorizontalGroup(
            pnlId15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId15Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlId15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId15Layout.createSequentialGroup()
                        .addGroup(pnlId15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel98, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel105, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId15Layout.createSequentialGroup()
                                .addComponent(txtTonometriaOD, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(txtTonometriaHora, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(46, 46, 46)
                                .addComponent(txtTonometriaFecha, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(txtTonometriaOI, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap(85, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId15Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jLabel113)
                        .addGap(83, 83, 83)
                        .addComponent(jLabel117)
                        .addGap(109, 109, 109))))
        );
        pnlId15Layout.setVerticalGroup(
            pnlId15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId15Layout.createSequentialGroup()
                .addGroup(pnlId15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtTonometriaOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel105))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId15Layout.createSequentialGroup()
                        .addGroup(pnlId15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel113)
                            .addComponent(jLabel117))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel98)
                            .addComponent(txtTonometriaOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtTonometriaHora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtTonometriaFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(32, 32, 32)))
                .addGap(0, 3, Short.MAX_VALUE))
        );

        jPanel16.add(pnlId15);
        pnlId15.setBounds(230, 120, 418, 110);

        btnNuevo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/add.png"))); // NOI18N
        btnNuevo.setText("Nuevo");
        btnNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNuevoActionPerformed(evt);
            }
        });
        jPanel16.add(btnNuevo);
        btnNuevo.setBounds(90, 150, 110, 27);

        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/filesave.png"))); // NOI18N
        btnGuardar.setText("Guardar");
        btnGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarActionPerformed(evt);
            }
        });
        jPanel16.add(btnGuardar);
        btnGuardar.setBounds(90, 180, 110, 27);

        tblProcedimientosEspeciales.setModel(modelotblProcedimientoEspecial);
        tblProcedimientosEspeciales.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblProcedimientosEspecialesMouseClicked(evt);
            }
        });
        jScrollPane17.setViewportView(tblProcedimientosEspeciales);

        jPanel16.add(jScrollPane17);
        jScrollPane17.setBounds(670, 120, 380, 110);

        jPanel21.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Anexos Oculares", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(27, 27, 87)));
        jPanel21.setLayout(null);

        txtDiscoOpticoOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtDiscoOpticoODMouseClicked(evt);
            }
        });
        jPanel21.add(txtDiscoOpticoOD);
        txtDiscoOpticoOD.setBounds(220, 60, 400, 27);

        jLabel139.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel139.setForeground(new java.awt.Color(14, 54, 122));
        jLabel139.setText("Vasos");
        jPanel21.add(jLabel139);
        jLabel139.setBounds(100, 120, 50, 30);

        jLabel140.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel140.setForeground(new java.awt.Color(14, 41, 169));
        jLabel140.setText("O.I");
        jPanel21.add(jLabel140);
        jLabel140.setBounds(860, 10, 23, 20);

        jLabel141.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel141.setText("Vitreo");
        jPanel21.add(jLabel141);
        jLabel141.setBounds(100, 30, 60, 27);

        txtVitreoOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtVitreoODMouseClicked(evt);
            }
        });
        txtVitreoOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtVitreoODActionPerformed(evt);
            }
        });
        jPanel21.add(txtVitreoOD);
        txtVitreoOD.setBounds(220, 30, 400, 27);

        jLabel142.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel142.setForeground(new java.awt.Color(14, 54, 122));
        jLabel142.setText("Disco Optico");
        jPanel21.add(jLabel142);
        jLabel142.setBounds(100, 60, 110, 30);

        jLabel143.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel143.setText("Retina Periferica");
        jPanel21.add(jLabel143);
        jLabel143.setBounds(10, 150, 150, 30);

        txtVasosOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtVasosODMouseClicked(evt);
            }
        });
        txtVasosOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtVasosODActionPerformed(evt);
            }
        });
        jPanel21.add(txtVasosOD);
        txtVasosOD.setBounds(220, 120, 400, 27);

        txtMaculaOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtMaculaODMouseClicked(evt);
            }
        });
        jPanel21.add(txtMaculaOD);
        txtMaculaOD.setBounds(220, 90, 400, 27);

        jLabel144.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel144.setForeground(new java.awt.Color(14, 41, 169));
        jLabel144.setText("O.D");
        jPanel21.add(jLabel144);
        jLabel144.setBounds(430, 10, 28, 20);

        txtVitreoOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtVitreoOIMouseClicked(evt);
            }
        });
        jPanel21.add(txtVitreoOI);
        txtVitreoOI.setBounds(630, 30, 400, 27);

        txtDiscoOpticoOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtDiscoOpticoOIMouseClicked(evt);
            }
        });
        jPanel21.add(txtDiscoOpticoOI);
        txtDiscoOpticoOI.setBounds(630, 60, 400, 27);

        txtMaculaOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtMaculaOIMouseClicked(evt);
            }
        });
        jPanel21.add(txtMaculaOI);
        txtMaculaOI.setBounds(630, 90, 400, 27);

        txtVasosOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtVasosOIMouseClicked(evt);
            }
        });
        jPanel21.add(txtVasosOI);
        txtVasosOI.setBounds(630, 120, 400, 27);

        jLabel145.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel145.setForeground(new java.awt.Color(14, 54, 122));
        jLabel145.setText("Macula");
        jPanel21.add(jLabel145);
        jLabel145.setBounds(100, 90, 80, 30);

        jPanel22.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Anexos Oculares", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(27, 27, 87)));
        jPanel22.setLayout(null);
        jPanel22.add(jTextField112);
        jTextField112.setBounds(220, 60, 390, 27);

        jLabel146.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel146.setForeground(new java.awt.Color(14, 54, 122));
        jLabel146.setText("Vasos");
        jPanel22.add(jLabel146);
        jLabel146.setBounds(100, 120, 50, 30);

        jLabel147.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel147.setForeground(new java.awt.Color(14, 41, 169));
        jLabel147.setText("O.I");
        jPanel22.add(jLabel147);
        jLabel147.setBounds(790, 10, 23, 20);

        jLabel148.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel148.setText("Vitreo");
        jPanel22.add(jLabel148);
        jLabel148.setBounds(100, 30, 60, 27);

        jTextField113.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField113ActionPerformed(evt);
            }
        });
        jPanel22.add(jTextField113);
        jTextField113.setBounds(220, 30, 390, 27);

        jLabel149.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel149.setForeground(new java.awt.Color(14, 54, 122));
        jLabel149.setText("Disco Optico");
        jPanel22.add(jLabel149);
        jLabel149.setBounds(100, 60, 110, 30);

        jLabel150.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel150.setText("RETINA");
        jPanel22.add(jLabel150);
        jLabel150.setBounds(10, 90, 60, 30);
        jPanel22.add(jTextField114);
        jTextField114.setBounds(220, 120, 390, 27);
        jPanel22.add(jTextField115);
        jTextField115.setBounds(220, 90, 390, 27);

        jLabel151.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel151.setForeground(new java.awt.Color(14, 41, 169));
        jLabel151.setText("O.D");
        jPanel22.add(jLabel151);
        jLabel151.setBounds(380, 10, 28, 20);
        jPanel22.add(jTextField116);
        jTextField116.setBounds(620, 30, 390, 27);
        jPanel22.add(jTextField117);
        jTextField117.setBounds(620, 60, 390, 27);
        jPanel22.add(jTextField118);
        jTextField118.setBounds(620, 90, 390, 27);
        jPanel22.add(jTextField119);
        jTextField119.setBounds(620, 120, 390, 27);

        jLabel152.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel152.setForeground(new java.awt.Color(14, 54, 122));
        jLabel152.setText("Macula");
        jPanel22.add(jLabel152);
        jLabel152.setBounds(100, 90, 80, 30);

        jPanel21.add(jPanel22);
        jPanel22.setBounds(0, 0, 0, 0);

        jPanel23.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Anexos Oculares", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(27, 27, 87)));
        jPanel23.setLayout(null);
        jPanel23.add(jTextField120);
        jTextField120.setBounds(220, 60, 390, 27);

        jLabel153.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel153.setForeground(new java.awt.Color(14, 54, 122));
        jLabel153.setText("Vasos");
        jPanel23.add(jLabel153);
        jLabel153.setBounds(100, 120, 50, 30);

        jLabel154.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel154.setForeground(new java.awt.Color(14, 41, 169));
        jLabel154.setText("O.I");
        jPanel23.add(jLabel154);
        jLabel154.setBounds(790, 10, 23, 20);

        jLabel155.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel155.setText("Vitreo");
        jPanel23.add(jLabel155);
        jLabel155.setBounds(100, 30, 60, 27);

        jTextField121.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField121ActionPerformed(evt);
            }
        });
        jPanel23.add(jTextField121);
        jTextField121.setBounds(220, 30, 390, 27);

        jLabel156.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel156.setForeground(new java.awt.Color(14, 54, 122));
        jLabel156.setText("Disco Optico");
        jPanel23.add(jLabel156);
        jLabel156.setBounds(100, 60, 110, 30);

        jLabel157.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel157.setText("RETINA");
        jPanel23.add(jLabel157);
        jLabel157.setBounds(10, 90, 60, 30);
        jPanel23.add(jTextField122);
        jTextField122.setBounds(220, 120, 390, 27);
        jPanel23.add(jTextField123);
        jTextField123.setBounds(220, 90, 390, 27);

        jLabel158.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel158.setForeground(new java.awt.Color(14, 41, 169));
        jLabel158.setText("O.D");
        jPanel23.add(jLabel158);
        jLabel158.setBounds(380, 10, 28, 20);
        jPanel23.add(jTextField124);
        jTextField124.setBounds(620, 30, 390, 27);
        jPanel23.add(jTextField125);
        jTextField125.setBounds(620, 60, 390, 27);
        jPanel23.add(jTextField126);
        jTextField126.setBounds(620, 90, 390, 27);
        jPanel23.add(jTextField127);
        jTextField127.setBounds(620, 120, 390, 27);

        jLabel159.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel159.setForeground(new java.awt.Color(14, 54, 122));
        jLabel159.setText("Macula");
        jPanel23.add(jLabel159);
        jLabel159.setBounds(100, 90, 80, 30);

        jPanel24.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Anexos Oculares", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(27, 27, 87)));
        jPanel24.setLayout(null);
        jPanel24.add(jTextField128);
        jTextField128.setBounds(220, 60, 390, 27);

        jLabel160.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel160.setForeground(new java.awt.Color(14, 54, 122));
        jLabel160.setText("Vasos");
        jPanel24.add(jLabel160);
        jLabel160.setBounds(100, 120, 50, 30);

        jLabel161.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel161.setForeground(new java.awt.Color(14, 41, 169));
        jLabel161.setText("O.I");
        jPanel24.add(jLabel161);
        jLabel161.setBounds(790, 10, 23, 20);

        jLabel162.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel162.setText("Vitreo");
        jPanel24.add(jLabel162);
        jLabel162.setBounds(100, 30, 60, 27);

        jTextField129.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField129ActionPerformed(evt);
            }
        });
        jPanel24.add(jTextField129);
        jTextField129.setBounds(220, 30, 390, 27);

        jLabel163.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel163.setForeground(new java.awt.Color(14, 54, 122));
        jLabel163.setText("Disco Optico");
        jPanel24.add(jLabel163);
        jLabel163.setBounds(100, 60, 110, 30);

        jLabel164.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel164.setText("RETINA");
        jPanel24.add(jLabel164);
        jLabel164.setBounds(10, 90, 60, 30);
        jPanel24.add(jTextField130);
        jTextField130.setBounds(220, 120, 390, 27);
        jPanel24.add(jTextField131);
        jTextField131.setBounds(220, 90, 390, 27);

        jLabel165.setFont(new java.awt.Font("Droid Sans Fallback", 3, 15)); // NOI18N
        jLabel165.setForeground(new java.awt.Color(14, 41, 169));
        jLabel165.setText("O.D");
        jPanel24.add(jLabel165);
        jLabel165.setBounds(380, 10, 28, 20);
        jPanel24.add(jTextField132);
        jTextField132.setBounds(620, 30, 390, 27);
        jPanel24.add(jTextField133);
        jTextField133.setBounds(620, 60, 390, 27);
        jPanel24.add(jTextField134);
        jTextField134.setBounds(620, 90, 390, 27);
        jPanel24.add(jTextField135);
        jTextField135.setBounds(620, 120, 390, 27);

        jLabel166.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel166.setForeground(new java.awt.Color(14, 54, 122));
        jLabel166.setText("Macula");
        jPanel24.add(jLabel166);
        jLabel166.setBounds(100, 90, 80, 30);

        jPanel23.add(jPanel24);
        jPanel24.setBounds(0, 0, 0, 0);

        jPanel21.add(jPanel23);
        jPanel23.setBounds(0, 0, 0, 0);

        jLabel167.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel167.setText("RETINA");
        jPanel21.add(jLabel167);
        jLabel167.setBounds(10, 90, 60, 30);

        txtRetinaPerifericaOD.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtRetinaPerifericaODMouseClicked(evt);
            }
        });
        txtRetinaPerifericaOD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtRetinaPerifericaODActionPerformed(evt);
            }
        });
        jPanel21.add(txtRetinaPerifericaOD);
        txtRetinaPerifericaOD.setBounds(220, 150, 400, 27);

        txtRetinaPerifericaOI.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                txtRetinaPerifericaOIMouseClicked(evt);
            }
        });
        jPanel21.add(txtRetinaPerifericaOI);
        txtRetinaPerifericaOI.setBounds(630, 150, 400, 27);

        javax.swing.GroupLayout pnlSegmentoPosteriorLayout = new javax.swing.GroupLayout(pnlSegmentoPosterior);
        pnlSegmentoPosterior.setLayout(pnlSegmentoPosteriorLayout);
        pnlSegmentoPosteriorLayout.setHorizontalGroup(
            pnlSegmentoPosteriorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlSegmentoPosteriorLayout.createSequentialGroup()
                .addGroup(pnlSegmentoPosteriorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlSegmentoPosteriorLayout.createSequentialGroup()
                        .addGap(71, 71, 71)
                        .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, 1065, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlSegmentoPosteriorLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, 1057, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlSegmentoPosteriorLayout.setVerticalGroup(
            pnlSegmentoPosteriorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlSegmentoPosteriorLayout.createSequentialGroup()
                .addContainerGap(15, Short.MAX_VALUE)
                .addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        tpnlPaneles.addTab("Segmento Posterior", pnlSegmentoPosterior);

        pnlDiagReceta.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        pnlDiagReceta.setPreferredSize(new java.awt.Dimension(1130, 484));
        pnlDiagReceta.setLayout(null);

        jLabel2.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel2.setText("Anexos:");
        pnlDiagReceta.add(jLabel2);
        jLabel2.setBounds(12, 97, 51, 16);

        jLabel1.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel1.setText("Diagnostico: ");

        jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        jScrollPane1.setMaximumSize(new java.awt.Dimension(850, 112));
        jScrollPane1.setMinimumSize(new java.awt.Dimension(850, 112));
        jScrollPane1.setPreferredSize(new java.awt.Dimension(850, 112));

        pnlDiagnosticos.setMaximumSize(new java.awt.Dimension(848, 100000));
        pnlDiagnosticos.setVerifyInputWhenFocusTarget(false);
        pnlDiagnosticos.setLayout(new javax.swing.BoxLayout(pnlDiagnosticos, javax.swing.BoxLayout.Y_AXIS));
        jScrollPane1.setViewportView(pnlDiagnosticos);

        btnAgregarDR.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/add.png"))); // NOI18N
        btnAgregarDR.setToolTipText("Agregar Dg");
        btnAgregarDR.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarDRActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addContainerGap(916, Short.MAX_VALUE))
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(btnAgregarDR)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 919, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addComponent(btnAgregarDR)
                .addContainerGap(31, Short.MAX_VALUE))
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
        );

        pnlDiagReceta.add(jPanel12);
        jPanel12.setBounds(12, 0, 1000, 91);

        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "RECETA MEDICA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("DejaVu Sans", 1, 14), new java.awt.Color(148, 72, 36))); // NOI18N

        jLabel27.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel27.setText("Medicamentos");

        txtIndicacionDR.setColumns(20);
        txtIndicacionDR.setLineWrap(true);
        txtIndicacionDR.setRows(5);
        jScrollPane8.setViewportView(txtIndicacionDR);

        txtMedicamentosDR.setColumns(20);
        txtMedicamentosDR.setLineWrap(true);
        txtMedicamentosDR.setRows(5);
        jScrollPane9.setViewportView(txtMedicamentosDR);

        jLabel28.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel28.setText("Indicaciones");

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel27)
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 386, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 71, Short.MAX_VALUE)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel28)
                    .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 389, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(26, 26, 26))
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel28)
                    .addComponent(jLabel27))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE)
                    .addComponent(jScrollPane8)))
        );

        jLabel19.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel19.setText("Medicamentos:");

        jLabel29.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel29.setText("Patologia y Medicamentos:");

        jLabel3.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel3.setText("Cant:");

        btnAgregarPatologiaDR.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/Vial-Pills_2.png"))); // NOI18N
        btnAgregarPatologiaDR.setToolTipText("Agregar Enfermedad con Medicamentos e Indicaciones");
        btnAgregarPatologiaDR.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarPatologiaDRActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addComponent(jLabel19)
                        .addGap(90, 90, 90)
                        .addComponent(cmbMedicamentoDR, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel3))
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addComponent(jLabel29)
                        .addGap(18, 18, 18)
                        .addComponent(cmbPatologiaDR, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnAgregarPatologiaDR, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addGap(3, 3, 3)
                        .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cmbMedicamentoDR, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)))
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel19)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(cmbPatologiaDR, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel29))
                    .addComponent(btnAgregarPatologiaDR, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12))
        );

        btnAgregarMedicamentoDR.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/Vial-O.png"))); // NOI18N
        btnAgregarMedicamentoDR.setToolTipText("Agregar Medicamento a la Receta");
        btnAgregarMedicamentoDR.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarMedicamentoDRActionPerformed(evt);
            }
        });

        txtCantidadMedicamentosDR.setBackground(new java.awt.Color(216, 187, 182));
        txtCantidadMedicamentosDR.setToolTipText("Ingrese la Cantidad de Medicamentos");
        txtCantidadMedicamentosDR.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtCantidadMedicamentosDRActionPerformed(evt);
            }
        });
        txtCantidadMedicamentosDR.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtCantidadMedicamentosDRKeyTyped(evt);
            }
        });

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, 539, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCantidadMedicamentosDR, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnAgregarMedicamentoDR)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAgregarMedicamentoDR, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCantidadMedicamentosDR, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pnlDiagReceta.add(jPanel13);
        jPanel13.setBounds(12, 145, 896, 328);

        btnGuardarConsulta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/filesave.png"))); // NOI18N
        btnGuardarConsulta.setText("Guardar H.C.");
        btnGuardarConsulta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarConsultaActionPerformed(evt);
            }
        });
        pnlDiagReceta.add(btnGuardarConsulta);
        btnGuardarConsulta.setBounds(920, 380, 150, 27);

        btnImprimirReceta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/printer1.png"))); // NOI18N
        btnImprimirReceta.setText("Imprimir Receta");
        btnImprimirReceta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirRecetaActionPerformed(evt);
            }
        });
        pnlDiagReceta.add(btnImprimirReceta);
        btnImprimirReceta.setBounds(920, 420, 150, 27);

        txtAnexoDR.setColumns(20);
        txtAnexoDR.setRows(5);
        jScrollPane10.setViewportView(txtAnexoDR);

        pnlDiagReceta.add(jScrollPane10);
        jScrollPane10.setBounds(90, 100, 920, 42);

        tpnlPaneles.addTab("Diagnostico/Receta", pnlDiagReceta);

        pnlEvolucion.setLayout(null);

        jLabel24.setFont(new java.awt.Font("DejaVu Sans", 1, 18)); // NOI18N
        jLabel24.setForeground(new java.awt.Color(0, 3, 83));
        jLabel24.setText("Evolucion");
        pnlEvolucion.add(jLabel24);
        jLabel24.setBounds(490, 10, 97, 22);

        pnlId16.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Tonometria", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel169.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel169.setText("O.D");

        jLabel170.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel170.setText("O.I");

        jLabel171.setText("Hora");

        jLabel172.setText("Fecha");

        txtETonometriaHora.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtETonometriaHoraActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlId16Layout = new javax.swing.GroupLayout(pnlId16);
        pnlId16.setLayout(pnlId16Layout);
        pnlId16Layout.setHorizontalGroup(
            pnlId16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId16Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jLabel171)
                .addGap(87, 87, 87)
                .addComponent(jLabel172)
                .addGap(68, 68, 68))
            .addGroup(pnlId16Layout.createSequentialGroup()
                .addGroup(pnlId16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel170)
                    .addComponent(jLabel169))
                .addGap(23, 23, 23)
                .addGroup(pnlId16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtETonometriaOD, javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
                    .addComponent(txtETonometriaOI))
                .addGap(32, 32, 32)
                .addComponent(txtETonometriaHora, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(39, 39, 39)
                .addComponent(txtETonometriaFecha, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE)
                .addGap(32, 32, 32))
        );
        pnlId16Layout.setVerticalGroup(
            pnlId16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId16Layout.createSequentialGroup()
                .addGroup(pnlId16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId16Layout.createSequentialGroup()
                        .addComponent(jLabel171)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel169)
                            .addComponent(txtETonometriaOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtETonometriaHora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtETonometriaFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel170)
                            .addComponent(txtETonometriaOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlId16Layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jLabel172)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlEvolucion.add(pnlId16);
        pnlId16.setBounds(360, 200, 395, 110);

        pnlId11.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Vision Lejana", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel66.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel66.setForeground(new java.awt.Color(28, 37, 82));
        jLabel66.setText("S.C:");

        jLabel67.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel67.setForeground(new java.awt.Color(28, 37, 82));
        jLabel67.setText("C.C:");

        jLabel173.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel173.setText("O.D");

        jLabel174.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel174.setText("O.I");

        jLabel175.setFont(new java.awt.Font("Courier 10 Pitch", 1, 18)); // NOI18N
        jLabel175.setText("20/");

        jLabel176.setFont(new java.awt.Font("Courier 10 Pitch", 1, 18)); // NOI18N
        jLabel176.setText("20/");

        jLabel177.setFont(new java.awt.Font("Courier 10 Pitch", 1, 18)); // NOI18N
        jLabel177.setText("20/");

        jLabel178.setFont(new java.awt.Font("Courier 10 Pitch", 1, 18)); // NOI18N
        jLabel178.setText("20/");

        javax.swing.GroupLayout pnlId11Layout = new javax.swing.GroupLayout(pnlId11);
        pnlId11.setLayout(pnlId11Layout);
        pnlId11Layout.setHorizontalGroup(
            pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId11Layout.createSequentialGroup()
                .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId11Layout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId11Layout.createSequentialGroup()
                                .addGap(112, 112, 112)
                                .addComponent(jLabel173))
                            .addGroup(pnlId11Layout.createSequentialGroup()
                                .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel67)
                                    .addComponent(jLabel66))
                                .addGap(63, 63, 63)
                                .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlId11Layout.createSequentialGroup()
                                        .addComponent(jLabel176)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtEVisionLejanaCCOD, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(pnlId11Layout.createSequentialGroup()
                                        .addComponent(jLabel175)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtEVisionLejanaSCOD, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                    .addGroup(pnlId11Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(txtEVisionLejanaOD, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
                .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId11Layout.createSequentialGroup()
                        .addComponent(jLabel174)
                        .addGap(98, 98, 98))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId11Layout.createSequentialGroup()
                        .addComponent(txtEVisionLejanaOI, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(20, 20, 20))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId11Layout.createSequentialGroup()
                        .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId11Layout.createSequentialGroup()
                                .addComponent(jLabel177)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtEVisionLejanaCCOI, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlId11Layout.createSequentialGroup()
                                .addComponent(jLabel178)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtEVisionLejanaSCOI, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(53, 53, 53))))
        );
        pnlId11Layout.setVerticalGroup(
            pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId11Layout.createSequentialGroup()
                .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel173)
                    .addComponent(jLabel174))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlId11Layout.createSequentialGroup()
                        .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(txtEVisionLejanaSCOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel175))
                            .addComponent(jLabel66, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtEVisionLejanaCCOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel176)
                            .addComponent(jLabel67)))
                    .addGroup(pnlId11Layout.createSequentialGroup()
                        .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtEVisionLejanaSCOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel178))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtEVisionLejanaCCOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel177))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlId11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtEVisionLejanaOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEVisionLejanaOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlEvolucion.add(pnlId11);
        pnlId11.setBounds(10, 40, 525, 155);

        pnlId7.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "Vision Cercana", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel179.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel179.setForeground(new java.awt.Color(28, 37, 82));
        jLabel179.setText("S.C:");

        jLabel180.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel180.setForeground(new java.awt.Color(28, 37, 82));
        jLabel180.setText("C.C:");

        jLabel181.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel181.setText("O.D");

        jLabel182.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel182.setText("O.I");

        cmbEVisionCercanaSCJ.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "J1", "J2", "J3", "J4", "J5", "J6", "J7" }));
        cmbEVisionCercanaSCJ.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbEVisionCercanaSCJActionPerformed(evt);
            }
        });

        cmbEVisionCercanaCCJ.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "J1", "J2", "J3", "J4", "J5", "J6", "J7" }));

        javax.swing.GroupLayout pnlId7Layout = new javax.swing.GroupLayout(pnlId7);
        pnlId7.setLayout(pnlId7Layout);
        pnlId7Layout.setHorizontalGroup(
            pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId7Layout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId7Layout.createSequentialGroup()
                        .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel180)
                            .addComponent(jLabel179))
                        .addGap(36, 36, 36)
                        .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtEVisionCercanaCCOD)
                            .addComponent(txtEVisionCercanaSCOD, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlId7Layout.createSequentialGroup()
                        .addGap(79, 79, 79)
                        .addComponent(jLabel181)))
                .addGap(73, 73, 73)
                .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId7Layout.createSequentialGroup()
                        .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtEVisionCercanaCCOI)
                            .addComponent(txtEVisionCercanaSCOI, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(31, 31, 31)
                        .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cmbEVisionCercanaSCJ, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cmbEVisionCercanaCCJ, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlId7Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(jLabel182)))
                .addContainerGap(44, Short.MAX_VALUE))
        );
        pnlId7Layout.setVerticalGroup(
            pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId7Layout.createSequentialGroup()
                .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel181)
                    .addComponent(jLabel182))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId7Layout.createSequentialGroup()
                        .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtEVisionCercanaSCOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cmbEVisionCercanaSCJ, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtEVisionCercanaCCOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(cmbEVisionCercanaCCJ, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlId7Layout.createSequentialGroup()
                        .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtEVisionCercanaSCOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel179, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlId7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtEVisionCercanaCCOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel180))))
                .addContainerGap(40, Short.MAX_VALUE))
        );

        pnlEvolucion.add(pnlId7);
        pnlId7.setBounds(550, 40, 440, 150);

        pnlId17.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED), "RP FINAL", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, null, null));

        jLabel183.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel183.setText("O.D");

        jLabel184.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel184.setText("O.I");

        jLabel56.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel56.setForeground(new java.awt.Color(26, 64, 129));
        jLabel56.setText("DISTANCIA");

        jLabel57.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel57.setText("ESF.");

        jLabel58.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel58.setText("CIL.");

        jLabel59.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel59.setText("EJE.");

        jLabel185.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel185.setText("PRISMA");

        jLabel186.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel186.setText("D.I");

        jLabel187.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel187.setText("DNP");

        jLabel188.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel188.setText("DNP");

        jLabel189.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel189.setText("D.I");

        jLabel190.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel190.setText("PRISMA");

        jLabel191.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel191.setForeground(new java.awt.Color(26, 64, 129));
        jLabel191.setText("LECTURA");

        jLabel192.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel192.setText("EJE.");

        jLabel193.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel193.setText("CIL.");

        jLabel194.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel194.setText("ESF.");

        jLabel195.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel195.setText("O.I");

        jLabel196.setFont(new java.awt.Font("DejaVu Sans", 1, 16)); // NOI18N
        jLabel196.setText("O.D");

        jLabel197.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
        jLabel197.setForeground(new java.awt.Color(26, 64, 129));
        jLabel197.setText("ADICION");

        javax.swing.GroupLayout pnlId17Layout = new javax.swing.GroupLayout(pnlId17);
        pnlId17.setLayout(pnlId17Layout);
        pnlId17Layout.setHorizontalGroup(
            pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlId17Layout.createSequentialGroup()
                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId17Layout.createSequentialGroup()
                        .addGap(200, 200, 200)
                        .addComponent(jLabel56))
                    .addGroup(pnlId17Layout.createSequentialGroup()
                        .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel184)
                            .addComponent(jLabel183))
                        .addGap(18, 18, 18)
                        .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId17Layout.createSequentialGroup()
                                .addComponent(txtEDistanciaESFOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtEDistanciaCILOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtEDistanciaEJEOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtEDistanciaPRISMAOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtEDistanciaDIOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtEDistanciaDNPOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlId17Layout.createSequentialGroup()
                                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(pnlId17Layout.createSequentialGroup()
                                        .addGap(12, 12, 12)
                                        .addComponent(jLabel57)
                                        .addGap(42, 42, 42)
                                        .addComponent(jLabel58)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel59)
                                        .addGap(26, 26, 26))
                                    .addGroup(pnlId17Layout.createSequentialGroup()
                                        .addComponent(txtEDistanciaESFOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(txtEDistanciaCILOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtEDistanciaEJEOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlId17Layout.createSequentialGroup()
                                        .addComponent(jLabel185)
                                        .addGap(27, 27, 27)
                                        .addComponent(jLabel186)
                                        .addGap(35, 35, 35)
                                        .addComponent(jLabel187))
                                    .addGroup(pnlId17Layout.createSequentialGroup()
                                        .addComponent(txtEDistanciaPRISMAOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtEDistanciaDIOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(12, 12, 12)
                                        .addComponent(txtEDistanciaDNPOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtAdicionOI, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtAdicionOD, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel197))
                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlId17Layout.createSequentialGroup()
                        .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel195)
                            .addComponent(jLabel196))
                        .addGap(18, 18, 18)
                        .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlId17Layout.createSequentialGroup()
                                .addComponent(txtELecturaESFOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtELecturaCILOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtELecturaEJEOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtELecturaPRISMAOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtELecturaDIOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtELecturaDNPOI, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlId17Layout.createSequentialGroup()
                                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(pnlId17Layout.createSequentialGroup()
                                        .addGap(12, 12, 12)
                                        .addComponent(jLabel194)
                                        .addGap(42, 42, 42)
                                        .addComponent(jLabel193)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jLabel192)
                                        .addGap(26, 26, 26))
                                    .addGroup(pnlId17Layout.createSequentialGroup()
                                        .addComponent(txtELecturaESFOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(txtELecturaCILOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtELecturaEJEOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pnlId17Layout.createSequentialGroup()
                                        .addComponent(txtELecturaPRISMAOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txtELecturaDIOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(12, 12, 12)
                                        .addComponent(txtELecturaDNPOD, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(pnlId17Layout.createSequentialGroup()
                                        .addComponent(jLabel190)
                                        .addGap(27, 27, 27)
                                        .addComponent(jLabel189)
                                        .addGap(35, 35, 35)
                                        .addComponent(jLabel188))))))
                    .addGroup(pnlId17Layout.createSequentialGroup()
                        .addGap(200, 200, 200)
                        .addComponent(jLabel191))))
        );
        pnlId17Layout.setVerticalGroup(
            pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId17Layout.createSequentialGroup()
                .addComponent(jLabel56)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel185)
                    .addComponent(jLabel186)
                    .addComponent(jLabel187)
                    .addComponent(jLabel59)
                    .addComponent(jLabel58)
                    .addComponent(jLabel57))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtEDistanciaESFOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel183)
                    .addComponent(txtEDistanciaCILOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEDistanciaEJEOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEDistanciaPRISMAOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEDistanciaDNPOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEDistanciaDIOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel184)
                    .addComponent(txtEDistanciaESFOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEDistanciaCILOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEDistanciaEJEOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEDistanciaPRISMAOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEDistanciaDIOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtEDistanciaDNPOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId17Layout.createSequentialGroup()
                .addComponent(jLabel197)
                .addGap(29, 29, 29)
                .addComponent(txtAdicionOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txtAdicionOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlId17Layout.createSequentialGroup()
                .addComponent(jLabel191)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel190)
                    .addComponent(jLabel189)
                    .addComponent(jLabel188)
                    .addComponent(jLabel192)
                    .addComponent(jLabel193)
                    .addComponent(jLabel194))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtELecturaESFOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel196)
                    .addComponent(txtELecturaCILOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtELecturaEJEOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtELecturaPRISMAOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtELecturaDNPOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtELecturaDIOD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlId17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel195)
                    .addComponent(txtELecturaESFOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtELecturaCILOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtELecturaEJEOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtELecturaPRISMAOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtELecturaDIOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtELecturaDNPOI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        pnlEvolucion.add(pnlId17);
        pnlId17.setBounds(10, 320, 956, 137);

        jButton3.setFont(new java.awt.Font("DejaVu Sans", 0, 11)); // NOI18N
        jButton3.setText("Receta de Lentes");
        pnlEvolucion.add(jButton3);
        jButton3.setBounds(970, 370, 110, 40);

        tpnlPaneles.addTab("Evolucion ", pnlEvolucion);

        pnlEvolucion1.setPreferredSize(new java.awt.Dimension(1130, 484));

        btnGuardarEvolucion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/filesave.png"))); // NOI18N
        btnGuardarEvolucion.setText("Guardar Evolucion");
        btnGuardarEvolucion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarEvolucionActionPerformed(evt);
            }
        });

        btnImprimirEvolucion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/printer1.png"))); // NOI18N
        btnImprimirEvolucion.setText("Imprimir Receta");

        jLabel12.setText("Fecha");

        jLabel13.setText("Hora");

        jLabel22.setFont(new java.awt.Font("DejaVu Sans", 1, 18)); // NOI18N
        jLabel22.setForeground(new java.awt.Color(0, 3, 83));
        jLabel22.setText("Evolucion");

        txtEvolucion.setColumns(20);
        txtEvolucion.setRows(5);
        jScrollPane12.setViewportView(txtEvolucion);

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jLabel12)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtFechaEvolucion, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel13)
                .addGap(18, 18, 18)
                .addComponent(txtHoraEvolucion, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(435, Short.MAX_VALUE))
            .addComponent(jScrollPane12)
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel22)
                    .addComponent(jLabel13)
                    .addComponent(txtHoraEvolucion, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel12)
                        .addComponent(txtFechaEvolucion, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE))
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "RECETA MEDICA", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("DejaVu Sans", 1, 14), new java.awt.Color(148, 72, 36))); // NOI18N

        jLabel20.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel20.setText("Medicamentos");

        txtIndicacionesE.setColumns(20);
        txtIndicacionesE.setRows(5);
        jScrollPane4.setViewportView(txtIndicacionesE);

        txtMedicamentosE.setColumns(20);
        txtMedicamentosE.setRows(5);
        jScrollPane3.setViewportView(txtMedicamentosE);

        jLabel21.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel21.setText("Indicaciones");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel20)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 417, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel21)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 415, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel21)
                    .addComponent(jLabel20))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)
                    .addComponent(jScrollPane4)))
        );

        btnAgregarPatologiaE.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/Vial-Pills_2.png"))); // NOI18N
        btnAgregarPatologiaE.setToolTipText("Agregar Enfermedad con Medicamentos e Indicaciones");
        btnAgregarPatologiaE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarPatologiaEActionPerformed(evt);
            }
        });

        jLabel17.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel17.setText("Medicamentos:");

        jLabel18.setFont(new java.awt.Font("Ubuntu", 1, 13)); // NOI18N
        jLabel18.setText("Patologia y Medicamentos:");

        jLabel4.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel4.setText("Cant:");

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel17)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addGap(190, 190, 190)
                        .addComponent(cmbMedicamentoE, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addComponent(jLabel4))
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addComponent(jLabel18)
                .addGap(18, 18, 18)
                .addComponent(cmbPatologiaE, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addComponent(btnAgregarPatologiaE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel17)
                    .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cmbMedicamentoE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel4)))
                .addGap(11, 11, 11)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cmbPatologiaE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel18))
                        .addGap(5, 5, 5))
                    .addComponent(btnAgregarPatologiaE, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        btnAgregarMedicamentoE.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/Vial-O.png"))); // NOI18N
        btnAgregarMedicamentoE.setToolTipText("Agregar Medicamento a la Receta");
        btnAgregarMedicamentoE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarMedicamentoEActionPerformed(evt);
            }
        });

        txtCantidadMedicamentosE.setBackground(new java.awt.Color(216, 187, 182));
        txtCantidadMedicamentosE.setToolTipText("Ingrese la Cantidad de Medicamentos");
        txtCantidadMedicamentosE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtCantidadMedicamentosEActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, 535, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCantidadMedicamentosE, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnAgregarMedicamentoE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAgregarMedicamentoE, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtCantidadMedicamentosE, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout pnlEvolucion1Layout = new javax.swing.GroupLayout(pnlEvolucion1);
        pnlEvolucion1.setLayout(pnlEvolucion1Layout);
        pnlEvolucion1Layout.setHorizontalGroup(
            pnlEvolucion1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEvolucion1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlEvolucion1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEvolucion1Layout.createSequentialGroup()
                        .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlEvolucion1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(btnGuardarEvolucion, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE)
                            .addComponent(btnImprimirEvolucion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(20, Short.MAX_VALUE))
        );
        pnlEvolucion1Layout.setVerticalGroup(
            pnlEvolucion1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEvolucion1Layout.createSequentialGroup()
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlEvolucion1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlEvolucion1Layout.createSequentialGroup()
                        .addComponent(btnGuardarEvolucion)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnImprimirEvolucion)
                        .addGap(43, 43, 43))))
        );

        tpnlPaneles.addTab("Evolucion 1", pnlEvolucion1);

        btnNewEvolucion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/Edit.png"))); // NOI18N
        btnNewEvolucion.setText("Evolucion");
        btnNewEvolucion.setToolTipText("Crear Evolucion del Paciente");
        btnNewEvolucion.setEnabled(false);
        btnNewEvolucion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNewEvolucionActionPerformed(evt);
            }
        });

        btnImprimirHC.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/PatientData.png"))); // NOI18N
        btnImprimirHC.setText("Imprimir H.C");
        btnImprimirHC.setToolTipText("Imprimir la Historia Clinica o Evolucion");
        btnImprimirHC.setEnabled(false);
        btnImprimirHC.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirHCActionPerformed(evt);
            }
        });

        btnNewConsulta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/add.png"))); // NOI18N
        btnNewConsulta.setText("Nuevo");
        btnNewConsulta.setToolTipText("Crear Consulta");
        btnNewConsulta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNewConsultaActionPerformed(evt);
            }
        });

        jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/agt_home.png"))); // NOI18N
        jButton6.setText("Cerrar");
        jButton6.setToolTipText("Salir");
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton6ActionPerformed(evt);
            }
        });

        btnViewDatosPersonales.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/PatientMale.png"))); // NOI18N
        btnViewDatosPersonales.setText("Datos Personales");
        btnViewDatosPersonales.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnViewDatosPersonalesActionPerformed(evt);
            }
        });

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/Certificado Medico.png"))); // NOI18N
        jButton1.setText("Certificado Medico");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        btnExamenes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/dep1.png"))); // NOI18N
        btnExamenes.setText("Examenes");
        btnExamenes.setToolTipText("");
        btnExamenes.setEnabled(false);
        btnExamenes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExamenesActionPerformed(evt);
            }
        });

        btnRecetaLentes.setText("Receta de Lentes");
        btnRecetaLentes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRecetaLentesActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlBotonesLayout = new javax.swing.GroupLayout(pnlBotones);
        pnlBotones.setLayout(pnlBotonesLayout);
        pnlBotonesLayout.setHorizontalGroup(
            pnlBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBotonesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(btnNewConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnNewEvolucion, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnExamenes, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnImprimirHC, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnRecetaLentes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnViewDatosPersonales)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlBotonesLayout.setVerticalGroup(
            pnlBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(btnViewDatosPersonales)
                .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(pnlBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(btnNewEvolucion)
                .addComponent(btnExamenes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnImprimirHC, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(btnRecetaLentes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(btnNewConsulta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        jLabel11.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel11.setText("Consulta:");

        jLabel10.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel10.setText("Proxima Cita:");

        txtEdadPacient.setBackground(new java.awt.Color(225, 228, 248));
        txtEdadPacient.setEditable(false);

        jTextField8.setBackground(new java.awt.Color(115, 172, 68));
        jTextField8.setToolTipText("Doble click para seleccionar la proxima cita");
        jTextField8.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTextField8MouseClicked(evt);
            }
        });
        jTextField8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField8ActionPerformed(evt);
            }
        });

        jLabel15.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel15.setText("Hora:");

        jLabel9.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel9.setText("Nro Hc:");

        jLabel8.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel8.setText("Edad:");

        jLabel14.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel14.setText("Fecha:");

        txtNumHC.setBackground(new java.awt.Color(250, 249, 203));
        txtNumHC.setEditable(false);

        jLabel26.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N
        jLabel26.setText("Paciente:");

        txtNomPacient.setBackground(new java.awt.Color(225, 228, 248));
        txtNomPacient.setEditable(false);
        txtNomPacient.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtNomPacientActionPerformed(evt);
            }
        });

        txtNumConsulta.setBackground(new java.awt.Color(250, 249, 203));
        txtNumConsulta.setEditable(false);

        jLabel30.setText("años");

        btnCerrarConsulta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jpgs/delete.png"))); // NOI18N
        btnCerrarConsulta.setToolTipText("Cerrar");
        btnCerrarConsulta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCerrarConsultaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlEmcabezadoLayout = new javax.swing.GroupLayout(pnlEmcabezado);
        pnlEmcabezado.setLayout(pnlEmcabezadoLayout);
        pnlEmcabezadoLayout.setHorizontalGroup(
            pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEmcabezadoLayout.createSequentialGroup()
                .addGroup(pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEmcabezadoLayout.createSequentialGroup()
                        .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(22, 22, 22))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlEmcabezadoLayout.createSequentialGroup()
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGroup(pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtNumConsulta)
                    .addComponent(txtNumHC, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE))
                .addGroup(pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlEmcabezadoLayout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel26)
                        .addGap(4, 4, 4)
                        .addComponent(txtNomPacient, javax.swing.GroupLayout.PREFERRED_SIZE, 377, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(pnlEmcabezadoLayout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtEdadPacient, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel30)))
                .addGap(18, 18, 18)
                .addGroup(pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEmcabezadoLayout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtFecha, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(pnlEmcabezadoLayout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(txtHora, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 60, Short.MAX_VALUE)
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnCerrarConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
        );
        pnlEmcabezadoLayout.setVerticalGroup(
            pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEmcabezadoLayout.createSequentialGroup()
                .addGroup(pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(pnlEmcabezadoLayout.createSequentialGroup()
                        .addGap(40, 40, 40)
                        .addComponent(btnCerrarConsulta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(pnlEmcabezadoLayout.createSequentialGroup()
                        .addGroup(pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(txtNumHC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel26)
                                .addComponent(txtNomPacient, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jLabel14, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(txtFecha, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlEmcabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtEdadPacient)
                            .addComponent(jTextField8)
                            .addComponent(jLabel10)
                            .addComponent(txtHora, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel30, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtNumConsulta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(pnlEmcabezado, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(tpnlPaneles, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1098, Short.MAX_VALUE)
                    .addComponent(pnlBotones, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(pnlEmcabezado, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tpnlPaneles, javax.swing.GroupLayout.PREFERRED_SIZE, 510, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlBotones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
        int aux = JOptionPane.showConfirmDialog(this, "¿Realmente desea cerrar la consulta?\n "
                + "Cualquier dato que no haya sido guardado se perdera\n"
                + "¿Esta seguro de querer continuar?", "Importante", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
        if (aux == 0) {
            dispose();
        }
    }//GEN-LAST:event_jButton6ActionPerformed

    private void txtNomPacientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNomPacientActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtNomPacientActionPerformed

    private void btnNewConsultaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewConsultaActionPerformed
        agregarPaneles();
        newConsulta();
        btnNewConsulta.setEnabled(false);
        btnExamenes.setEnabled(false);
        btnImprimirHC.setEnabled(false);
    }//GEN-LAST:event_btnNewConsultaActionPerformed

    private void jTextField8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField8ActionPerformed
    }//GEN-LAST:event_jTextField8ActionPerformed

    private void jTextField8MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTextField8MouseClicked
        iFrmReservaCita form = new iFrmReservaCita(paciente);
        frmPrincipal.dskpPrincipal.add(form);
        OperacionesVarias.centrar(form);
        form.toFront();
        form.setVisible(true);
    }//GEN-LAST:event_jTextField8MouseClicked

    private void btnAgregarDRActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarDRActionPerformed
        pnlsDiagnosticos.add(new pnlDiagnostico());
        pnlDiagnosticos.add(pnlsDiagnosticos.get(pnlsDiagnosticos.size() - 1));
    }//GEN-LAST:event_btnAgregarDRActionPerformed

    private void tblConsultasMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblConsultasMouseClicked
        if (tblConsultas.getRowCount() > 0) {
            int aux = tblConsultas.getSelectedRow();
            if (aux != -1) {
                consultaOftalmologia = (ConsultaOftalmologia) listConsultas.get(aux);
                btnExamenes.setEnabled(true);
                if (evt.getClickCount() == 2) {

                    setConsulta(consultaOftalmologia);
                    setEditable(true);
                    agregarPaneles();
                    btnNewEvolucion.setEnabled(true);
                    btnCerrarConsulta.setVisible(true);
                    btnImprimirHC.setEnabled(true);

                } else if (evt.getClickCount() == 1) {
                    cargarEvoluciones();
                    tblConsultasVisualizar.clearSelection();
                    tblEvolucionesVisualizar.clearSelection();
                }

            } else {
                JOptionPane.showMessageDialog(this, "Seleccione la consulta ...", "Visualizar Consulta", JOptionPane.WARNING_MESSAGE);
            }
        } else {
            JOptionPane.showMessageDialog(this, "No ha registrado ninguna consulta ...", "Visualizar Consulta", JOptionPane.WARNING_MESSAGE);
        }



    }//GEN-LAST:event_tblConsultasMouseClicked

    private void pnlDiagnostico1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pnlDiagnostico1MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_pnlDiagnostico1MouseClicked

    private void btnCerrarConsultaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCerrarConsultaActionPerformed
        int aux = IFrmHCGeneralOftalmologia.NULO;
        switch (getEstadoForm()) {
            case IFrmHCGeneralOftalmologia.NEW_CONSULTA:
                aux = JOptionPane.showConfirmDialog(this, "Los Datos de la consulta no han sido guardados:\n "
                        + "Si continua la informacion se perdera"
                        + "¿Esta seguro de querer continuar?", "Cerrar Consulta", JOptionPane.YES_NO_OPTION);
                break;
            case IFrmHCGeneralOftalmologia.VIEW_CONSULTA:
                aux = 0;
                break;
            case IFrmHCGeneralOftalmologia.NEW_EVOLUCION:
                aux = JOptionPane.showConfirmDialog(this, "Los Datos de la evolucion no han sido guardados:\n "
                        + "Si continua la informacion se perdera"
                        + "¿Esta seguro de querer continuar?", "Cerrar Evolucion", JOptionPane.YES_NO_OPTION);
                break;
            case IFrmHCGeneralOftalmologia.VIEW_EVOLUCION:
                aux = 0;
                break;
        }

        if (aux == 0) {
            tpnlPaneles.removeAll();
            listConsultas = (ArrayList<Object>) ConsultaBD.listarConsultas(paciente, usuario);
            if (!listConsultas.isEmpty()) {
                cargarConsultas();
                cargarEvoluciones();
                tpnlPaneles.add(pnlConsultas);
                tpnlPaneles.setTitleAt(0, "Listado de Consultas");
                btnExamenes.setEnabled(false);
                btnImprimirHC.setEnabled(false);
            }
            GregorianCalendar c = new GregorianCalendar();
            String dia = Calendario.diasCalendario[c.get(GregorianCalendar.DAY_OF_WEEK) - 1];
            txtFecha.setText(dia + ", " + OperacionesVarias.fechaString(c.getTime()));
            txtHora.setText(c.get(GregorianCalendar.HOUR) + ":" + c.get(GregorianCalendar.MINUTE) + ":" + c.get(GregorianCalendar.SECOND));
            txtNumConsulta.setText("");
            btnCerrarConsulta.setVisible(false);
            btnNewEvolucion.setEnabled(false);
            btnNewConsulta.setEnabled(true);
        }
    }//GEN-LAST:event_btnCerrarConsultaActionPerformed

    private void btnGuardarConsultaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarConsultaActionPerformed
        int aux = JOptionPane.showConfirmDialog(this, "Los datos que se guardaran a continuacion no podran ser modificados:\n "
                + "¿Esta seguro de querer continuar?", "Guardar Consulta", JOptionPane.YES_NO_OPTION);
        if (aux == 0) {

            switch (getEstadoForm()) {

                case IFrmHCGeneralOftalmologia.NEW_CONSULTA:

                    if (OperacionesBD.guardar(getConsulta(consultaOftalmologia))) {
                        setEstadoForm(IFrmHCGeneralOftalmologia.VIEW_CONSULTA);
                        btnNewEvolucion.setEnabled(true);
                        btnExamenes.setEnabled(true);
                        btnImprimirHC.setEnabled(true);
                        JOptionPane.showMessageDialog(null, "Datos de consulta guardados correctamente ...", "Guardar", JOptionPane.INFORMATION_MESSAGE);
                    } else {
                        JOptionPane.showMessageDialog(null, "Los datos de consulta no se han podido guardar ...", "Guardar", JOptionPane.ERROR_MESSAGE);
                    }

                    break;
                case IFrmHCGeneralOftalmologia.VIEW_CONSULTA:

                    if (OperacionesBD.modificar(getConsulta(consultaOftalmologia))) {
                        JOptionPane.showMessageDialog(null, "Datos de consulta guardados correctamente ...", "Guardar", JOptionPane.INFORMATION_MESSAGE);
                    } else {
                        JOptionPane.showMessageDialog(null, "Los datos de consulta no se han podido guardar ...", "Guardar", JOptionPane.ERROR_MESSAGE);
                    }

                    break;
//                case IFrmHCGeneral.NEW_EVOLUCION:
//                    break;
//                case IFrmHCGeneral.VIEW_EVOLUCION:
//                    break;
            }

        }
    }//GEN-LAST:event_btnGuardarConsultaActionPerformed

    private void txtCantidadMedicamentosDRActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCantidadMedicamentosDRActionPerformed
    }//GEN-LAST:event_txtCantidadMedicamentosDRActionPerformed

    private void txtCantidadMedicamentosEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCantidadMedicamentosEActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtCantidadMedicamentosEActionPerformed

    private void btnAgregarPatologiaDRActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarPatologiaDRActionPerformed
        int index = cmbPatologiaDR.getSelectedIndex();
        if (index != -1) {
            Patologia p = (Patologia) listPatologias.get(index);
            txtIndicacionDR.append(p.getIndicaciones() + "\n\n");
            txtMedicamentosDR.append(p.getMedicamentos() + "\n\n");
        }
    }//GEN-LAST:event_btnAgregarPatologiaDRActionPerformed

    private void txtCantidadMedicamentosDRKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtCantidadMedicamentosDRKeyTyped
        OperacionesVarias.ingresoSoloNumeros(evt);
    }//GEN-LAST:event_txtCantidadMedicamentosDRKeyTyped

    private void btnAgregarMedicamentoDRActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarMedicamentoDRActionPerformed
        int index = cmbMedicamentoDR.getSelectedIndex();
        if (index != -1) {
            MedicamentoComercial mc = (MedicamentoComercial) listMedicamentos.get(index);
            String texto1 = "", texto2 = "";
            StringTokenizer st = new StringTokenizer("" + mc, ")");
            int c = 0;
            while (st.hasMoreTokens()) {
                if (c == 0) {
                    texto1 = st.nextToken() + ")";
                } else {
                    texto2 = st.nextToken();
                }
                c++;
            }
            String s = "";
            int num = 0;
            try {
                num = Integer.parseInt(txtCantidadMedicamentosDR.getText());
            } catch (NumberFormatException e) {
            }

            txtMedicamentosDR.append(texto1 + "\n" + texto2 + " #" + num
                    + "(" + NumeroLetra.obtenerStringNumero(num) + ")\n\n");


        }
    }//GEN-LAST:event_btnAgregarMedicamentoDRActionPerformed

    private void tblEvolucionesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblEvolucionesMouseClicked
        if (tblEvoluciones.getRowCount() > 0) {
            int aux = tblEvoluciones.getSelectedRow();
            if (aux != -1) {
                evolucionOftalmologia = (EvolucionOftalmologia) listEvoluciones.get(aux);
                if (evt.getClickCount() == 2) {
                    setEditableEvolucion(true);
                    setEvolucion(evolucionOftalmologia);
                    btnNewEvolucion.setEnabled(true);
                    btnCerrarConsulta.setVisible(true);
                    setEstadoForm(IFrmHCGeneralOftalmologia.VIEW_EVOLUCION);
                } else if (evt.getClickCount() == 1) {
                    tblConsultasVisualizar.clearSelection();
                    tblEvolucionesVisualizar.clearSelection();
                }

            } else {
                JOptionPane.showMessageDialog(this, "Seleccione la evolucion ...", "Visualizar Evolucion", JOptionPane.WARNING_MESSAGE);
            }
        } else {
            JOptionPane.showMessageDialog(this, "No ha registrado ninguna evolucion ...", "Visualizar Evolucion", JOptionPane.WARNING_MESSAGE);
        }

    }//GEN-LAST:event_tblEvolucionesMouseClicked

    private void btnGuardarEvolucionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarEvolucionActionPerformed

        int aux = JOptionPane.showConfirmDialog(this, "Los datos que se guardaran a continuacion no podran ser modificados:\n "
                + "¿Esta seguro de querer continuar?", "Guardar Evolucion", JOptionPane.YES_NO_OPTION);
        if (aux == 0) {

            switch (getEstadoForm()) {

//                case IFrmHCGeneral.NEW_CONSULTA:
//                    paciente.getConsultas().add(getConsulta(consulta));
//                    OperacionesBD.modificar(paciente);
//                    paciente = (Paciente) OperacionesBD.buscar("Paciente", "idPersona", "" + paciente.getIdPersona());
//                    consulta = paciente.getConsultas().get(paciente.getConsultas().size() - 1);
//                    setEstadoForm(IFrmHCGeneral.VIEW_CONSULTA);
//                    break;
//                case IFrmHCGeneral.VIEW_CONSULTA:
////                    OperacionesBD.modificar(consulta);
//
//                    for (int i = 0; i < paciente.getConsultas().size(); i++) {
//                        if (paciente.getConsultas().get(i).getIdConsulta() == consulta.getIdConsulta()) {
//                            paciente.getConsultas().set(i, getConsulta(consulta));
//                        }
//                    }
//                    OperacionesBD.modificar(paciente);
//                    break;
                case IFrmHCGeneralOftalmologia.NEW_EVOLUCION:

                    if (OperacionesBD.guardar(getEvolucion(evolucionOftalmologia))) {
                        setEstadoForm(IFrmHCGeneralOftalmologia.VIEW_EVOLUCION);
                        JOptionPane.showMessageDialog(null, "Datos de evolucion guardados correctamente ...", "Guardar", JOptionPane.INFORMATION_MESSAGE);
                    } else {
                        JOptionPane.showMessageDialog(null, "Los datos de evolucion no se han podido guardar ...", "Guardar", JOptionPane.ERROR_MESSAGE);
                    }
                    break;
                case IFrmHCGeneralOftalmologia.VIEW_EVOLUCION:

                    if (OperacionesBD.modificar(getEvolucion(evolucionOftalmologia))) {

                        JOptionPane.showMessageDialog(null, "Datos de evolucion guardados correctamente ...", "Guardar", JOptionPane.INFORMATION_MESSAGE);
                    } else {
                        JOptionPane.showMessageDialog(null, "Los datos de evolucion no se han podido guardar ...", "Guardar", JOptionPane.ERROR_MESSAGE);
                    }

                    break;
            }

        }

    }//GEN-LAST:event_btnGuardarEvolucionActionPerformed

    private void btnNewEvolucionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewEvolucionActionPerformed
        newEvolucion();

    }//GEN-LAST:event_btnNewEvolucionActionPerformed

    private void btnAgregarMedicamentoEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarMedicamentoEActionPerformed
        int index = cmbMedicamentoE.getSelectedIndex();
        if (index != -1) {
            MedicamentoComercial mc = (MedicamentoComercial) listMedicamentos.get(index);
            String texto1 = "", texto2 = "";
            StringTokenizer st = new StringTokenizer("" + mc, ")");
            int c = 0;
            while (st.hasMoreTokens()) {
                if (c == 0) {
                    texto1 = st.nextToken() + ")";
                } else {
                    texto2 = st.nextToken();
                }
                c++;
            }

            String s = "";
            int num = 0;
            try {
                num = Integer.parseInt(txtCantidadMedicamentosE.getText());
            } catch (NumberFormatException e) {
            }

            txtMedicamentosE.append(texto1 + "\n" + texto2 + " #" + num
                    + "(" + NumeroLetra.obtenerStringNumero(num) + ")\n\n");




        }
    }//GEN-LAST:event_btnAgregarMedicamentoEActionPerformed

    private void btnAgregarPatologiaEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarPatologiaEActionPerformed
        int index = cmbPatologiaE.getSelectedIndex();
        if (index != -1) {
            Patologia p = (Patologia) listPatologias.get(cmbPatologiaE.getSelectedIndex());
            txtIndicacionesE.append(p.getIndicaciones() + "\n\n");
            txtMedicamentosE.append(p.getMedicamentos() + "\n\n");
        }
    }//GEN-LAST:event_btnAgregarPatologiaEActionPerformed

    private void btnViewDatosPersonalesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnViewDatosPersonalesActionPerformed
        iFrmDatosPaciente FrDatosPaciente = new iFrmDatosPaciente(paciente);
        frmPrincipal.dskpPrincipal.add(FrDatosPaciente);
        FrDatosPaciente.setVisible(true);
        OperacionesVarias.centrar(FrDatosPaciente);
    }//GEN-LAST:event_btnViewDatosPersonalesActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        iFrmCertificadoMedico FrCmedico = new iFrmCertificadoMedico(paciente);
        frmPrincipal.dskpPrincipal.add(FrCmedico);
        FrCmedico.toFront();
        FrCmedico.setVisible(true);
        OperacionesVarias.centrar(FrCmedico);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void btnExamenesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExamenesActionPerformed
//        iFrmExamenes examenes = new iFrmExamenes(consulta);
//        frmPrincipal.dskpPrincipal.add(examenes);
//        OperacionesVarias.centrar(examenes);
    }//GEN-LAST:event_btnExamenesActionPerformed

    private void tblConsultasVisualizarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblConsultasVisualizarMouseClicked
        if (tblConsultasVisualizar.getRowCount() > 0) {
            int aux = tblConsultasVisualizar.getSelectedRow();
            if (aux != -1) {
                consultaVisualizar = listConsultasVisualizar.get(aux);
                Consulta consul = consultaVisualizar.getConsulta();
                if (evt.getClickCount() == 2) {

//                    setConsulta(consul);
                    setEditable(false);
                    agregarPaneles();
                    btnCerrarConsulta.setVisible(true);

                } else if (evt.getClickCount() == 1) {
                    cargarEvolucionesVisualizar();
                    tblConsultas.clearSelection();
                    tblEvoluciones.clearSelection();
                    btnExamenes.setEnabled(false);
                }

            } else {
                JOptionPane.showMessageDialog(this, "Seleccione la consulta ...", "Visualizar Consulta", JOptionPane.WARNING_MESSAGE);
            }
        } else {
            JOptionPane.showMessageDialog(this, "No ha registrado ninguna consulta ...", "Visualizar Consulta", JOptionPane.WARNING_MESSAGE);
        }

    }//GEN-LAST:event_tblConsultasVisualizarMouseClicked

    private void mnConsultaVisualizacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnConsultaVisualizacionActionPerformed
        int index = tblConsultas.getSelectedRow();
        if (index != -1) {
            IFrmCompartirConsultas cc = new IFrmCompartirConsultas((Consulta) listConsultas.get(index));
            frmPrincipal.dskpPrincipal.add(cc);
            OperacionesVarias.centrar(cc);

        }
    }//GEN-LAST:event_mnConsultaVisualizacionActionPerformed

    private void tblEvolucionesVisualizarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblEvolucionesVisualizarMouseClicked
        if (tblEvolucionesVisualizar.getRowCount() > 0) {
            int aux = tblEvolucionesVisualizar.getSelectedRow();
            if (aux != -1) {
                Evolucion evolu = (Evolucion) listEvolucionesVisualizar.get(aux);
                if (evt.getClickCount() == 2) {
                    setEditableEvolucion(false);

//                    setEvolucion(evolu);
                    btnCerrarConsulta.setVisible(true);
                    setEstadoForm(IFrmHCGeneralOftalmologia.VIEW_EVOLUCION);
                } else if (evt.getClickCount() == 1) {
                    tblConsultas.clearSelection();
                    tblEvoluciones.clearSelection();
                }
            } else {
                JOptionPane.showMessageDialog(this, "Seleccione la evolucion ...", "Visualizar Evolucion", JOptionPane.WARNING_MESSAGE);
            }
        } else {
            JOptionPane.showMessageDialog(this, "No ha registrado ninguna evolucion ...", "Visualizar Evolucion", JOptionPane.WARNING_MESSAGE);
        }

    }//GEN-LAST:event_tblEvolucionesVisualizarMouseClicked

    private String getDiagnosticoImprimir() {
        String str = "";
        int cont = 0;
        for (Diagnostico diag : consultaOftalmologia.getDiagnosticos()) {
            cont++;
            str += cont + ".- " + diag.getDiagnostico() + "     ";
            if (diag.getTipo() == 0) {
                str += "(PRESUNTIVO)\n\n";
            } else {
                str += "(DEFINITIVO)\n\n";
            }
        }

        return str;
    }

    private void btnImprimirHCActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirHCActionPerformed
//        //Cargas Datos de Compañia
//        ArrayList<Pyme> list = (ArrayList<Pyme>) OperacionesBD.listar("Pyme");
//        Pyme pyme = null;
//        if (!list.isEmpty()) {
//            pyme = list.get(0);
//        } else {
//            pyme = new Pyme();
//        }
//
//        Map<String, Object> parametros = new HashMap<String, Object>();
//        parametros.put("COMPANIA", pyme.getNombre());
//        parametros.put("DIRECCION", pyme.getDireccion());
//        parametros.put("TELEFONO", pyme.getTelefono());
//        parametros.put("FAX", pyme.getFax());
//        parametros.put("NHC", paciente.getNumeroHC());
//        parametros.put("NUM_CONSUL", consulta.getNumConsul());
//        parametros.put("DA_NOMBRE", paciente.getNombre());
//        parametros.put("DA_APELLIDO", paciente.getApellido());
//        parametros.put("DA_CEDULA", paciente.getCedula());
//        parametros.put("DA_DIRECCION", paciente.getDireccion());
//        parametros.put("DA_TELEFONO", paciente.getTelefono());
//        parametros.put("DA_CELULAR", paciente.getCelular());
//        parametros.put("DA_FNACE", paciente.getFechaNace());
//        parametros.put("DA_EDAD", Persona.calcularAnos(paciente.getFechaNace()));
//        parametros.put("DA_LNACE", paciente.getLugarNace());
//        parametros.put("DA_LRESIDE", paciente.getLugarResi());
//        parametros.put("DA_INSTRUCCION", paciente.getInstruccion());
//        parametros.put("DA_PROFECCION", paciente.getProfeccion());
//        parametros.put("DA_OCUPACION", paciente.getOcupacion());
//        parametros.put("DA_RAZA", paciente.getRaza());
//        parametros.put("DA_ESTADOCIVIL", paciente.geteCivil());
//        parametros.put("DA_GRUPOS", paciente.gettSangre());
//        parametros.put("DA_SEGURO", paciente.getSeguro());
//        parametros.put("AN_MOTIVO_CONSULTA", txtMotivoConsulta.getText());
//        parametros.put("AN_ENFERMEDAD_ACTUAL", consulta.getEnfermedadActual());
//        parametros.put("AN_ANTECEDENTES_PERSONALES", consulta.getAntecedent_Person());
//        parametros.put("AN_ANTECEDENTES_FAMILIARES", consulta.getAntecedent_Fami());
//        parametros.put("EF_TA", consulta.getExamenFisico().gettA());
//        parametros.put("EF_FC", consulta.getExamenFisico().getfC());
//        parametros.put("EF_FR", consulta.getExamenFisico().getfR());
//        parametros.put("EF_T", consulta.getExamenFisico().getTemperatura() + " " + cmbTemperatura.getSelectedItem().toString());
//        parametros.put("EF_SAT02", consulta.getExamenFisico().getSat02());
//        parametros.put("EF_LLENADO_CAPILAR", consulta.getExamenFisico().getLlenadocapilar());
//        parametros.put("EF_GLICEMIA", consulta.getExamenFisico().getGlicemia());
//        parametros.put("EF_PESO", consulta.getExamenFisico().getPeso());
//        parametros.put("EF_TALLA", consulta.getExamenFisico().getTalla());
//        parametros.put("EF_IMC", txtImc.getText());
//        parametros.put("EF_BIOTIPO_CONST", consulta.getExamenFisico().getBiotipoConst());
//        parametros.put("EF_ESTADO_NUTRI", consulta.getExamenFisico().getEstadoNutricional());
//        parametros.put("EF_SOMATOEXPRESIVA", consulta.getExamenFisico().getSomatoexpresiva());
//        parametros.put("EF_PSICOEXPRESIVA", consulta.getExamenFisico().getPsicoexpresiva());
//        parametros.put("D_DIAGNOSTICO", getDiagnosticoImprimir());
//        parametros.put("D_ANEXOS", consulta.getAnexos());
//        parametros.put("D_MEDICAMENTOS", consulta.getRecetaMedica().getMedicamentos());
//        parametros.put("D_INDICACIONES", consulta.getRecetaMedica().getIndicaciones());
//
//        ArrayList aux = new ArrayList();
//        aux.add("aux");
//
//        try {
//            JasperReport reporte = (JasperReport) JRLoader.loadObject(getClass().getResource("/modulos/reportes/historiaclinica/HistoriaClinica.jasper"));
//
////            JasperReport reporte = (JasperReport) JRLoader.loadObject("src/modulos/reportes/historiaclinica/HistoriaClinica.jasper");
//            JasperPrint jasperPrint = JasperFillManager.fillReport(reporte, parametros, new JRBeanCollectionDataSource(aux));
//            JasperViewer vista = new JasperViewer(jasperPrint, false);
//            vista.setSize(frmPrincipal.dskpPrincipal.size());
//            vista.setVisible(true);
//        } catch (JRException ex) {
//            Logger.getLogger(iFrmAgenda.class.getName()).log(Level.SEVERE, null, ex);
//        }
    }//GEN-LAST:event_btnImprimirHCActionPerformed

    private void btnImprimirRecetaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirRecetaActionPerformed
//
//        Map<String, Object> parametros = new HashMap<String, Object>();
//        parametros.put("NOMBRE", paciente);
//        parametros.put("MEDICAMENTOS", consulta.getRecetaMedica().getMedicamentos());
//        parametros.put("INDICACIONES", consulta.getRecetaMedica().getIndicaciones());
//        ArrayList aux = new ArrayList();
//        aux.add("aux");
//        try {
//
//            JasperReport reporte = (JasperReport) JRLoader.loadObject(getClass().getResource("/modulos/reportes/receta/Receta.jasper"));
//            JasperPrint jasperPrint = JasperFillManager.fillReport(reporte, parametros, new JRBeanCollectionDataSource(aux));
//            JasperViewer vista = new JasperViewer(jasperPrint, false);
//            vista.setSize(frmPrincipal.dskpPrincipal.size());
//            vista.setVisible(true);
//        } catch (JRException ex) {
//            Logger.getLogger(iFrmAgenda.class.getName()).log(Level.SEVERE, null, ex);
//        }
    }//GEN-LAST:event_btnImprimirRecetaActionPerformed

    private void comboSCActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboSCActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_comboSCActionPerformed

    private void camaraAnteriorODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_camaraAnteriorODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_camaraAnteriorODActionPerformed

    private void corneaODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_corneaODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_corneaODActionPerformed

    private void conjuntivaOIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_conjuntivaOIActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_conjuntivaOIActionPerformed

    private void conjuntivaODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_conjuntivaODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_conjuntivaODActionPerformed

    private void pupilaOIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pupilaOIActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_pupilaOIActionPerformed

    private void pupilaODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pupilaODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_pupilaODActionPerformed

    private void irisOIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_irisOIActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_irisOIActionPerformed

    private void irisODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_irisODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_irisODActionPerformed

    private void anguloIridoCornealODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_anguloIridoCornealODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_anguloIridoCornealODActionPerformed

    private void cristalinoODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cristalinoODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cristalinoODActionPerformed

    private void jTextField81ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField81ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextField81ActionPerformed

    private void jTextField89ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField89ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextField89ActionPerformed

    private void jTextField97ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField97ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextField97ActionPerformed

    private void txtVitreoODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtVitreoODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtVitreoODActionPerformed

    private void txtVasosODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtVasosODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtVasosODActionPerformed

    private void jTextField113ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField113ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextField113ActionPerformed

    private void jTextField121ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField121ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextField121ActionPerformed

    private void jTextField129ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField129ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextField129ActionPerformed

    private void txtRetinaPerifericaODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRetinaPerifericaODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtRetinaPerifericaODActionPerformed

    private void btnAgregarMotivoConsultaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarMotivoConsultaActionPerformed
        iFrmHCMotivo form = new iFrmHCMotivo();
        frmPrincipal.dskpPrincipal.add(form);
        OperacionesVarias.centrar(form);
        form.setVisible(true);
    }//GEN-LAST:event_btnAgregarMotivoConsultaActionPerformed

    private void btnAddMotivoConsulActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddMotivoConsulActionPerformed
        int index = cmbMotivoConsulta.getSelectedIndex();
        if (index != -1) {
            Motivo_Consulta aux = (Motivo_Consulta) listMotivoConsultas.get(index);
            if (consultaOftalmologia.getMotivo_Consulta().contains(aux)) {
                consultaOftalmologia.getMotivo_Consulta().remove(aux);
            } else {
                consultaOftalmologia.getMotivo_Consulta().add(aux);
            }
            txtMotivoConsulta.setText("");
            for (int i = 0; i < consultaOftalmologia.getMotivo_Consulta().size(); i++) {
                txtMotivoConsulta.setText(txtMotivoConsulta.getText() + (i + 1) + ".- " + consultaOftalmologia.getMotivo_Consulta().get(i) + "    ");
            }
        }
    }//GEN-LAST:event_btnAddMotivoConsulActionPerformed
    private void cmbEVisionCercanaSCJActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbEVisionCercanaSCJActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cmbEVisionCercanaSCJActionPerformed

    private void tblProcedimientosEspecialesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblProcedimientosEspecialesMouseClicked
        int index = tblProcedimientosEspeciales.getSelectedRow();
        if (index != -1) {
            ProcedimientoEspecial pro = listaProcedimientoEspecial.get(index);
            txtCamposVisualesOD.setText(pro.getCamposVisualesOD());
            txtCamposVisualesOI.setText(pro.getCamposVisualesOI());
            txtTonometriaOD.setText(pro.getTonometriaOD());
            txtTonometriaOI.setText(pro.getTonometriaOI());
        }

    }//GEN-LAST:event_tblProcedimientosEspecialesMouseClicked

    private void btnGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarActionPerformed
        ProcedimientoEspecial pro = new ProcedimientoEspecial();
        pro.setCamposVisualesOD(txtCamposVisualesOD.getText());
        pro.setCamposVisualesOI(txtCamposVisualesOI.getText());
        pro.setTonometriaFecha(new Date());
        pro.setTonometriaOD(txtTonometriaOD.getText());
        pro.setTonometriaOI(txtTonometriaOI.getText());
        DateFormat d = DateFormat.getDateInstance().getDateInstance(DateFormat.SHORT);
        txtTonometriaFecha.setText(d.format(new Date()));
        listaProcedimientoEspecial.add(pro);
        cargarTblProcedimientoEspecial();

    }//GEN-LAST:event_btnGuardarActionPerformed

    private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNuevoActionPerformed
        txtCamposVisualesOD.setText("");
        txtCamposVisualesOI.setText("");
        txtTonometriaFecha.setText("");
        txtTonometriaHora.setText("");
        txtTonometriaOD.setText("");
        txtTonometriaOI.setText("");
        DateFormat d = DateFormat.getDateInstance(DateFormat.SHORT);
        txtTonometriaFecha.setText(d.format(new Date()));
        DateFormat formatoHora = new SimpleDateFormat("HH:mm");
        txtTonometriaHora.setText(formatoHora.format(new Date()));

    }//GEN-LAST:event_btnNuevoActionPerformed

    private void txtETonometriaHoraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtETonometriaHoraActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtETonometriaHoraActionPerformed

    private void motilidadOcularODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_motilidadOcularODMouseClicked
        if (evt.getClickCount() == 2) {
            motilidadOcularOD.setText("");
        }
    }//GEN-LAST:event_motilidadOcularODMouseClicked

    private void motilidadOcularOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_motilidadOcularOIMouseClicked
        if (evt.getClickCount() == 2) {
            motilidadOcularOI.setText("");
        }
    }//GEN-LAST:event_motilidadOcularOIMouseClicked

    private void parpadosPestanasODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_parpadosPestanasODMouseClicked
        if (evt.getClickCount() == 2) {
            parpadosPestanasOD.setText("");
        }
    }//GEN-LAST:event_parpadosPestanasODMouseClicked

    private void viasLacrimalesODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_viasLacrimalesODMouseClicked
        if (evt.getClickCount() == 2) {
            viasLacrimalesOD.setText("");
        }
    }//GEN-LAST:event_viasLacrimalesODMouseClicked

    private void conjuntivaODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_conjuntivaODMouseClicked
        if (evt.getClickCount() == 2) {
            conjuntivaOD.setText("");
        }
    }//GEN-LAST:event_conjuntivaODMouseClicked

    private void corneaODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_corneaODMouseClicked
        if (evt.getClickCount() == 2) {
            corneaOD.setText("");
        }
    }//GEN-LAST:event_corneaODMouseClicked

    private void camaraAnteriorODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_camaraAnteriorODMouseClicked
        if (evt.getClickCount() == 2) {
            camaraAnteriorOD.setText("");
        }
    }//GEN-LAST:event_camaraAnteriorODMouseClicked

    private void pupilaODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pupilaODMouseClicked
        if (evt.getClickCount() == 2) {
            pupilaOD.setText("");
        }
    }//GEN-LAST:event_pupilaODMouseClicked

    private void irisODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_irisODMouseClicked
        if (evt.getClickCount() == 2) {
            irisOD.setText("");
        }
    }//GEN-LAST:event_irisODMouseClicked

    private void anguloIridoCornealODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_anguloIridoCornealODMouseClicked
        if (evt.getClickCount() == 2) {
            anguloIridoCornealOD.setText("");
        }
    }//GEN-LAST:event_anguloIridoCornealODMouseClicked

    private void txtVisionColoresMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtVisionColoresMouseClicked
if (evt.getClickCount() == 2) {
            txtVisionColores.setText("");
        }
    }//GEN-LAST:event_txtVisionColoresMouseClicked

    private void btnRecetaLentesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRecetaLentesActionPerformed
//        iFrmListaLentes fll = new iFrmListaLentes(paciente);
//        frmPrincipal.dskpPrincipal.add(fll);
//        fll.toFront();
//        fll.setVisible(true);
    }//GEN-LAST:event_btnRecetaLentesActionPerformed

    private void btnRecetaDeLentesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRecetaDeLentesActionPerformed
        if (!camposVacios()) {
            setReceta();
            iFrmRecetaLentesOftalmologia frl = new iFrmRecetaLentesOftalmologia(receta, paciente);
            frmPrincipal.dskpPrincipal.add(frl);
            frl.toFront();
            frl.setVisible(true);
        } else {
            Mensaje.camposVacios();
        }
    }//GEN-LAST:event_btnRecetaDeLentesActionPerformed

    private void parpadosPestanasODActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_parpadosPestanasODActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_parpadosPestanasODActionPerformed

    private void cristalinoODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cristalinoODMouseClicked
  if (evt.getClickCount() == 2) {
            cristalinoOD.setText("");
        }
     
    }//GEN-LAST:event_cristalinoODMouseClicked

    private void parpadosPestanasOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_parpadosPestanasOIMouseClicked
       if (evt.getClickCount() == 2) {
            parpadosPestanasOI.setText("");
        }
    }//GEN-LAST:event_parpadosPestanasOIMouseClicked

    private void viasLacrimalesOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_viasLacrimalesOIMouseClicked
   if (evt.getClickCount() == 2) {
            viasLacrimalesOI.setText("");
        }
    }//GEN-LAST:event_viasLacrimalesOIMouseClicked

    private void conjuntivaOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_conjuntivaOIMouseClicked
    if (evt.getClickCount() == 2) {
            conjuntivaOI.setText("");
        }
        
    }//GEN-LAST:event_conjuntivaOIMouseClicked

    private void corneaOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_corneaOIMouseClicked
  if (evt.getClickCount() == 2) {
            corneaOI.setText("");
        }
    }//GEN-LAST:event_corneaOIMouseClicked

    private void camaraAnteriorOIMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_camaraAnteriorOIMouseEntered
        // TODO add your handling code here:
    }//GEN-LAST:event_camaraAnteriorOIMouseEntered

    private void camaraAnteriorOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_camaraAnteriorOIMouseClicked
     if (evt.getClickCount() == 2) {
            camaraAnteriorOI.setText("");
        }
    }//GEN-LAST:event_camaraAnteriorOIMouseClicked

    private void pupilaOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pupilaOIMouseClicked
  if (evt.getClickCount() == 2) {
            pupilaOI.setText("");
        }
    }//GEN-LAST:event_pupilaOIMouseClicked

    private void irisOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_irisOIMouseClicked
  if (evt.getClickCount() == 2) {
            irisOI.setText("");
        }
    }//GEN-LAST:event_irisOIMouseClicked

    private void anguloIridoCornealOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_anguloIridoCornealOIMouseClicked
if (evt.getClickCount() == 2) {
            anguloIridoCornealOI.setText("");
        }        // TODO add your handling code here:
    }//GEN-LAST:event_anguloIridoCornealOIMouseClicked

    private void cristalinoOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cristalinoOIMouseClicked
   if (evt.getClickCount() == 2) {
            cristalinoOI.setText("");
        }
    }//GEN-LAST:event_cristalinoOIMouseClicked

    private void txtVitreoODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtVitreoODMouseClicked
if (evt.getClickCount() == 2) {
            txtVitreoOD.setText("");
        }     
    }//GEN-LAST:event_txtVitreoODMouseClicked

    private void txtDiscoOpticoODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtDiscoOpticoODMouseClicked
 if (evt.getClickCount() == 2) {
            txtDiscoOpticoOD.setText("");
        }
    }//GEN-LAST:event_txtDiscoOpticoODMouseClicked

    private void txtMaculaODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtMaculaODMouseClicked
if (evt.getClickCount() == 2) {
            txtMaculaOD.setText("");
        }
    }//GEN-LAST:event_txtMaculaODMouseClicked

    private void txtVasosODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtVasosODMouseClicked
    if (evt.getClickCount() == 2) {
            txtVasosOD.setText("");
        }
    }//GEN-LAST:event_txtVasosODMouseClicked

    private void txtRetinaPerifericaODMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtRetinaPerifericaODMouseClicked
     if (evt.getClickCount() == 2) {
           txtRetinaPerifericaOD.setText("");
        }
    }//GEN-LAST:event_txtRetinaPerifericaODMouseClicked

    private void txtVitreoOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtVitreoOIMouseClicked
  if (evt.getClickCount() == 2) {
            txtVitreoOI.setText("");
        }
    }//GEN-LAST:event_txtVitreoOIMouseClicked

    private void txtDiscoOpticoOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtDiscoOpticoOIMouseClicked
if (evt.getClickCount() == 2) {
            txtDiscoOpticoOI.setText("");
        }
    }//GEN-LAST:event_txtDiscoOpticoOIMouseClicked

    private void txtMaculaOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtMaculaOIMouseClicked
if (evt.getClickCount() == 2) {
            txtMaculaOI.setText("");
        }
    }//GEN-LAST:event_txtMaculaOIMouseClicked

    private void txtVasosOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtVasosOIMouseClicked
  if (evt.getClickCount() == 2) {
            txtVasosOI.setText("");
        }
    }//GEN-LAST:event_txtVasosOIMouseClicked

    private void txtRetinaPerifericaOIMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtRetinaPerifericaOIMouseClicked
  if (evt.getClickCount() == 2) {
            txtRetinaPerifericaOI.setText("");
        }
    }//GEN-LAST:event_txtRetinaPerifericaOIMouseClicked

    private void txtVisionProfundidadMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtVisionProfundidadMouseClicked
if (evt.getClickCount() == 2) {
            txtVisionProfundidad.setText("");
        }
    }//GEN-LAST:event_txtVisionProfundidadMouseClicked

    private void txtSensibContrasteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtSensibContrasteMouseClicked
   if (evt.getClickCount() == 2) {
            txtSensibContraste.setText("");
        }
    }//GEN-LAST:event_txtSensibContrasteMouseClicked

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField anguloIridoCornealOD;
    private javax.swing.JTextField anguloIridoCornealOI;
    private javax.swing.JButton btnAddMotivoConsul;
    private javax.swing.JButton btnAgregarDR;
    private javax.swing.JButton btnAgregarMedicamentoDR;
    private javax.swing.JButton btnAgregarMedicamentoE;
    private javax.swing.JButton btnAgregarMotivoConsulta;
    private javax.swing.JButton btnAgregarPatologiaDR;
    private javax.swing.JButton btnAgregarPatologiaE;
    private javax.swing.JButton btnCerrarConsulta;
    private javax.swing.JButton btnExamenes;
    private javax.swing.JButton btnGuardar;
    private javax.swing.JButton btnGuardarConsulta;
    private javax.swing.JButton btnGuardarEvolucion;
    private javax.swing.JButton btnImprimirEvolucion;
    private javax.swing.JButton btnImprimirHC;
    private javax.swing.JButton btnImprimirReceta;
    private javax.swing.JButton btnNewConsulta;
    private javax.swing.JButton btnNewEvolucion;
    private javax.swing.JButton btnNuevo;
    private javax.swing.JButton btnRecetaDeLentes;
    private javax.swing.JButton btnRecetaLentes;
    private javax.swing.JButton btnViewDatosPersonales;
    private javax.swing.JTextField camaraAnteriorOD;
    private javax.swing.JTextField camaraAnteriorOI;
    private javax.swing.JComboBox cmbEVisionCercanaCCJ;
    private javax.swing.JComboBox cmbEVisionCercanaSCJ;
    private javax.swing.JComboBox cmbMedicamentoDR;
    private javax.swing.JComboBox cmbMedicamentoE;
    private static javax.swing.JComboBox cmbMotivoConsulta;
    private javax.swing.JComboBox cmbPatologiaDR;
    private javax.swing.JComboBox cmbPatologiaE;
    private javax.swing.JComboBox comboCC;
    private javax.swing.JComboBox comboSC;
    private javax.swing.JTextField conjuntivaOD;
    private javax.swing.JTextField conjuntivaOI;
    private javax.swing.JTextField corneaOD;
    private javax.swing.JTextField corneaOI;
    private javax.swing.JTextField cristalinoOD;
    private javax.swing.JTextField cristalinoOI;
    private javax.swing.JTextField irisOD;
    private javax.swing.JTextField irisOI;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton6;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel100;
    private javax.swing.JLabel jLabel101;
    private javax.swing.JLabel jLabel102;
    private javax.swing.JLabel jLabel103;
    private javax.swing.JLabel jLabel104;
    private javax.swing.JLabel jLabel105;
    private javax.swing.JLabel jLabel106;
    private javax.swing.JLabel jLabel107;
    private javax.swing.JLabel jLabel108;
    private javax.swing.JLabel jLabel109;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel110;
    private javax.swing.JLabel jLabel111;
    private javax.swing.JLabel jLabel112;
    private javax.swing.JLabel jLabel113;
    private javax.swing.JLabel jLabel114;
    private javax.swing.JLabel jLabel115;
    private javax.swing.JLabel jLabel116;
    private javax.swing.JLabel jLabel117;
    private javax.swing.JLabel jLabel118;
    private javax.swing.JLabel jLabel119;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel120;
    private javax.swing.JLabel jLabel121;
    private javax.swing.JLabel jLabel122;
    private javax.swing.JLabel jLabel123;
    private javax.swing.JLabel jLabel124;
    private javax.swing.JLabel jLabel125;
    private javax.swing.JLabel jLabel126;
    private javax.swing.JLabel jLabel127;
    private javax.swing.JLabel jLabel128;
    private javax.swing.JLabel jLabel129;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel130;
    private javax.swing.JLabel jLabel131;
    private javax.swing.JLabel jLabel132;
    private javax.swing.JLabel jLabel133;
    private javax.swing.JLabel jLabel134;
    private javax.swing.JLabel jLabel135;
    private javax.swing.JLabel jLabel136;
    private javax.swing.JLabel jLabel137;
    private javax.swing.JLabel jLabel138;
    private javax.swing.JLabel jLabel139;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel140;
    private javax.swing.JLabel jLabel141;
    private javax.swing.JLabel jLabel142;
    private javax.swing.JLabel jLabel143;
    private javax.swing.JLabel jLabel144;
    private javax.swing.JLabel jLabel145;
    private javax.swing.JLabel jLabel146;
    private javax.swing.JLabel jLabel147;
    private javax.swing.JLabel jLabel148;
    private javax.swing.JLabel jLabel149;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel150;
    private javax.swing.JLabel jLabel151;
    private javax.swing.JLabel jLabel152;
    private javax.swing.JLabel jLabel153;
    private javax.swing.JLabel jLabel154;
    private javax.swing.JLabel jLabel155;
    private javax.swing.JLabel jLabel156;
    private javax.swing.JLabel jLabel157;
    private javax.swing.JLabel jLabel158;
    private javax.swing.JLabel jLabel159;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel160;
    private javax.swing.JLabel jLabel161;
    private javax.swing.JLabel jLabel162;
    private javax.swing.JLabel jLabel163;
    private javax.swing.JLabel jLabel164;
    private javax.swing.JLabel jLabel165;
    private javax.swing.JLabel jLabel166;
    private javax.swing.JLabel jLabel167;
    private javax.swing.JLabel jLabel168;
    private javax.swing.JLabel jLabel169;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel170;
    private javax.swing.JLabel jLabel171;
    private javax.swing.JLabel jLabel172;
    private javax.swing.JLabel jLabel173;
    private javax.swing.JLabel jLabel174;
    private javax.swing.JLabel jLabel175;
    private javax.swing.JLabel jLabel176;
    private javax.swing.JLabel jLabel177;
    private javax.swing.JLabel jLabel178;
    private javax.swing.JLabel jLabel179;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel180;
    private javax.swing.JLabel jLabel181;
    private javax.swing.JLabel jLabel182;
    private javax.swing.JLabel jLabel183;
    private javax.swing.JLabel jLabel184;
    private javax.swing.JLabel jLabel185;
    private javax.swing.JLabel jLabel186;
    private javax.swing.JLabel jLabel187;
    private javax.swing.JLabel jLabel188;
    private javax.swing.JLabel jLabel189;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel190;
    private javax.swing.JLabel jLabel191;
    private javax.swing.JLabel jLabel192;
    private javax.swing.JLabel jLabel193;
    private javax.swing.JLabel jLabel194;
    private javax.swing.JLabel jLabel195;
    private javax.swing.JLabel jLabel196;
    private javax.swing.JLabel jLabel197;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel59;
    private javax.swing.JLabel jLabel60;
    private javax.swing.JLabel jLabel61;
    private javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel63;
    private javax.swing.JLabel jLabel64;
    private javax.swing.JLabel jLabel65;
    private javax.swing.JLabel jLabel66;
    private javax.swing.JLabel jLabel67;
    private javax.swing.JLabel jLabel68;
    private javax.swing.JLabel jLabel69;
    private javax.swing.JLabel jLabel70;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JLabel jLabel72;
    private javax.swing.JLabel jLabel73;
    private javax.swing.JLabel jLabel74;
    private javax.swing.JLabel jLabel75;
    private javax.swing.JLabel jLabel76;
    private javax.swing.JLabel jLabel77;
    private javax.swing.JLabel jLabel78;
    private javax.swing.JLabel jLabel79;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel80;
    private javax.swing.JLabel jLabel81;
    private javax.swing.JLabel jLabel82;
    private javax.swing.JLabel jLabel83;
    private javax.swing.JLabel jLabel84;
    private javax.swing.JLabel jLabel85;
    private javax.swing.JLabel jLabel86;
    private javax.swing.JLabel jLabel87;
    private javax.swing.JLabel jLabel88;
    private javax.swing.JLabel jLabel89;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabel90;
    private javax.swing.JLabel jLabel91;
    private javax.swing.JLabel jLabel92;
    private javax.swing.JLabel jLabel93;
    private javax.swing.JLabel jLabel94;
    private javax.swing.JLabel jLabel95;
    private javax.swing.JLabel jLabel96;
    private javax.swing.JLabel jLabel97;
    private javax.swing.JLabel jLabel98;
    private javax.swing.JLabel jLabel99;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPopupMenu jPopupMenu1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JScrollPane jScrollPane17;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane26;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JTextField jTextField100;
    private javax.swing.JTextField jTextField101;
    private javax.swing.JTextField jTextField102;
    private javax.swing.JTextField jTextField103;
    private javax.swing.JTextField jTextField112;
    private javax.swing.JTextField jTextField113;
    private javax.swing.JTextField jTextField114;
    private javax.swing.JTextField jTextField115;
    private javax.swing.JTextField jTextField116;
    private javax.swing.JTextField jTextField117;
    private javax.swing.JTextField jTextField118;
    private javax.swing.JTextField jTextField119;
    private javax.swing.JTextField jTextField120;
    private javax.swing.JTextField jTextField121;
    private javax.swing.JTextField jTextField122;
    private javax.swing.JTextField jTextField123;
    private javax.swing.JTextField jTextField124;
    private javax.swing.JTextField jTextField125;
    private javax.swing.JTextField jTextField126;
    private javax.swing.JTextField jTextField127;
    private javax.swing.JTextField jTextField128;
    private javax.swing.JTextField jTextField129;
    private javax.swing.JTextField jTextField130;
    private javax.swing.JTextField jTextField131;
    private javax.swing.JTextField jTextField132;
    private javax.swing.JTextField jTextField133;
    private javax.swing.JTextField jTextField134;
    private javax.swing.JTextField jTextField135;
    private javax.swing.JTextField jTextField30;
    private javax.swing.JTextField jTextField31;
    private javax.swing.JTextField jTextField32;
    private javax.swing.JTextField jTextField33;
    private javax.swing.JTextField jTextField34;
    private javax.swing.JTextField jTextField35;
    private javax.swing.JTextField jTextField8;
    private javax.swing.JTextField jTextField80;
    private javax.swing.JTextField jTextField81;
    private javax.swing.JTextField jTextField82;
    private javax.swing.JTextField jTextField83;
    private javax.swing.JTextField jTextField84;
    private javax.swing.JTextField jTextField85;
    private javax.swing.JTextField jTextField86;
    private javax.swing.JTextField jTextField87;
    private javax.swing.JTextField jTextField88;
    private javax.swing.JTextField jTextField89;
    private javax.swing.JTextField jTextField90;
    private javax.swing.JTextField jTextField91;
    private javax.swing.JTextField jTextField92;
    private javax.swing.JTextField jTextField93;
    private javax.swing.JTextField jTextField94;
    private javax.swing.JTextField jTextField95;
    private javax.swing.JTextField jTextField96;
    private javax.swing.JTextField jTextField97;
    private javax.swing.JTextField jTextField98;
    private javax.swing.JTextField jTextField99;
    private javax.swing.JMenuItem mnConsultaVisualizacion;
    private javax.swing.JTextField motilidadOcularOD;
    private javax.swing.JTextField motilidadOcularOI;
    private javax.swing.JTextField parpadosPestanasOD;
    private javax.swing.JTextField parpadosPestanasOI;
    private javax.swing.JPanel pnlAnamnesis;
    private javax.swing.JPanel pnlBotones;
    private javax.swing.JPanel pnlConsultas;
    private javax.swing.JPanel pnlDiagReceta;
    private javax.swing.JPanel pnlDiagnosticos;
    private javax.swing.JPanel pnlEmcabezado;
    private javax.swing.JPanel pnlEvolucion;
    private javax.swing.JPanel pnlEvolucion1;
    private javax.swing.JPanel pnlId;
    private javax.swing.JPanel pnlId1;
    private javax.swing.JPanel pnlId10;
    private javax.swing.JPanel pnlId11;
    private javax.swing.JPanel pnlId12;
    private javax.swing.JPanel pnlId13;
    private javax.swing.JPanel pnlId14;
    private javax.swing.JPanel pnlId15;
    private javax.swing.JPanel pnlId16;
    private javax.swing.JPanel pnlId17;
    private javax.swing.JPanel pnlId2;
    private javax.swing.JPanel pnlId6;
    private javax.swing.JPanel pnlId7;
    private javax.swing.JPanel pnlId8;
    private javax.swing.JPanel pnlId9;
    private javax.swing.JPanel pnlRefraccion;
    private javax.swing.JPanel pnlSegmentoAnterior;
    private javax.swing.JPanel pnlSegmentoPosterior;
    private javax.swing.JTextField pupilaOD;
    private javax.swing.JTextField pupilaOI;
    private javax.swing.JTable tblConsultas;
    private javax.swing.JTable tblConsultasVisualizar;
    private javax.swing.JTable tblEvoluciones;
    private javax.swing.JTable tblEvolucionesVisualizar;
    private javax.swing.JTable tblProcedimientosEspeciales;
    private javax.swing.JTextField tonometriaOD;
    private javax.swing.JTextField tonometriaOI;
    private javax.swing.JTabbedPane tpnlPaneles;
    private javax.swing.JTextField txtAdicOD;
    private javax.swing.JTextField txtAdicOI;
    private javax.swing.JTextField txtAdicionOD;
    private javax.swing.JTextField txtAdicionOI;
    private javax.swing.JTextArea txtAnexoDR;
    private javax.swing.JTextArea txtAntecedentFami;
    private javax.swing.JTextArea txtAntecedentPerson;
    private javax.swing.JTextField txtAutorefracOD;
    private javax.swing.JTextField txtAutorefracOI;
    private javax.swing.JTextArea txtCamposVisualesOD;
    private javax.swing.JTextArea txtCamposVisualesOI;
    private javax.swing.JTextField txtCantidadMedicamentosDR;
    private javax.swing.JTextField txtCantidadMedicamentosE;
    private javax.swing.JTextField txtComentOD;
    private javax.swing.JTextField txtComentOI;
    private javax.swing.JTextField txtDiscoOpticoOD;
    private javax.swing.JTextField txtDiscoOpticoOI;
    private javax.swing.JTextField txtDistanciaCilOD;
    private javax.swing.JTextField txtDistanciaCilOI;
    private javax.swing.JTextField txtDistanciaDIOI;
    private javax.swing.JTextField txtDistanciaDiOD;
    private javax.swing.JTextField txtDistanciaDnpOD;
    private javax.swing.JTextField txtDistanciaDnpOI;
    private javax.swing.JTextField txtDistanciaEjeOD;
    private javax.swing.JTextField txtDistanciaEjeOI;
    private javax.swing.JTextField txtDistanciaEsfOD;
    private javax.swing.JTextField txtDistanciaEsfOI;
    private javax.swing.JTextField txtDistanciaPrismaOD;
    private javax.swing.JTextField txtDistanciaPrismaOI;
    private javax.swing.JTextField txtEDistanciaCILOD;
    private javax.swing.JTextField txtEDistanciaCILOI;
    private javax.swing.JTextField txtEDistanciaDIOD;
    private javax.swing.JTextField txtEDistanciaDIOI;
    private javax.swing.JTextField txtEDistanciaDNPOD;
    private javax.swing.JTextField txtEDistanciaDNPOI;
    private javax.swing.JTextField txtEDistanciaEJEOD;
    private javax.swing.JTextField txtEDistanciaEJEOI;
    private javax.swing.JTextField txtEDistanciaESFOD;
    private javax.swing.JTextField txtEDistanciaESFOI;
    private javax.swing.JTextField txtEDistanciaPRISMAOD;
    private javax.swing.JTextField txtEDistanciaPRISMAOI;
    private javax.swing.JTextField txtELecturaCILOD;
    private javax.swing.JTextField txtELecturaCILOI;
    private javax.swing.JTextField txtELecturaDIOD;
    private javax.swing.JTextField txtELecturaDIOI;
    private javax.swing.JTextField txtELecturaDNPOD;
    private javax.swing.JTextField txtELecturaDNPOI;
    private javax.swing.JTextField txtELecturaEJEOD;
    private javax.swing.JTextField txtELecturaEJEOI;
    private javax.swing.JTextField txtELecturaESFOD;
    private javax.swing.JTextField txtELecturaESFOI;
    private javax.swing.JTextField txtELecturaPRISMAOD;
    private javax.swing.JTextField txtELecturaPRISMAOI;
    private javax.swing.JTextField txtETonometriaFecha;
    private javax.swing.JTextField txtETonometriaHora;
    private javax.swing.JTextField txtETonometriaOD;
    private javax.swing.JTextField txtETonometriaOI;
    private javax.swing.JTextField txtEVisionCercanaCCOD;
    private javax.swing.JTextField txtEVisionCercanaCCOI;
    private javax.swing.JTextField txtEVisionCercanaSCOD;
    private javax.swing.JTextField txtEVisionCercanaSCOI;
    private javax.swing.JTextField txtEVisionLejanaCCOD;
    private javax.swing.JTextField txtEVisionLejanaCCOI;
    private javax.swing.JTextField txtEVisionLejanaOD;
    private javax.swing.JTextField txtEVisionLejanaOI;
    private javax.swing.JTextField txtEVisionLejanaSCOD;
    private javax.swing.JTextField txtEVisionLejanaSCOI;
    private javax.swing.JTextField txtEdadPacient;
    private javax.swing.JTextArea txtEnfermedadActual;
    private javax.swing.JTextArea txtEvolucion;
    private javax.swing.JLabel txtFecha;
    private javax.swing.JLabel txtFechaEvolucion;
    private javax.swing.JLabel txtHora;
    private javax.swing.JLabel txtHoraEvolucion;
    private javax.swing.JTextArea txtIndicacionDR;
    private javax.swing.JTextArea txtIndicacionesE;
    private javax.swing.JTextField txtLecturaCilOD;
    private javax.swing.JTextField txtLecturaCilOI;
    private javax.swing.JTextField txtLecturaEjeOD;
    private javax.swing.JTextField txtLecturaEjeOI;
    private javax.swing.JTextField txtLecturaEsfOD;
    private javax.swing.JTextField txtLecturaEsfOI;
    private javax.swing.JTextField txtMaculaOD;
    private javax.swing.JTextField txtMaculaOI;
    private javax.swing.JTextArea txtMedicamentosDR;
    private javax.swing.JTextArea txtMedicamentosE;
    private javax.swing.JTextField txtMotivoConsulta;
    private javax.swing.JTextField txtNomPacient;
    private javax.swing.JTextField txtNumConsulta;
    private javax.swing.JTextField txtNumHC;
    private javax.swing.JTextArea txtOculares;
    private javax.swing.JTextField txtRetinaPerifericaOD;
    private javax.swing.JTextField txtRetinaPerifericaOI;
    private javax.swing.JTextField txtSensibContraste;
    private javax.swing.JTextField txtTonometriaFecha;
    private javax.swing.JTextField txtTonometriaHora;
    private javax.swing.JTextField txtTonometriaOD;
    private javax.swing.JTextField txtTonometriaOI;
    private javax.swing.JTextField txtVasosOD;
    private javax.swing.JTextField txtVasosOI;
    private javax.swing.JTextField txtVisionCercanaCCOD;
    private javax.swing.JTextField txtVisionCercanaCCOI;
    private javax.swing.JTextField txtVisionCercanaSCOD;
    private javax.swing.JTextField txtVisionCercanaSCOI;
    private javax.swing.JTextField txtVisionColores;
    private javax.swing.JTextField txtVisionLejanaCCOD;
    private javax.swing.JTextField txtVisionLejanaCCOI;
    private javax.swing.JTextField txtVisionLejanaSCOD;
    private javax.swing.JTextField txtVisionLejanaSCOI;
    private javax.swing.JTextField txtVisionProfundidad;
    private javax.swing.JTextField txtVitreoOD;
    private javax.swing.JTextField txtVitreoOI;
    private javax.swing.JTextField viasLacrimalesOD;
    private javax.swing.JTextField viasLacrimalesOI;
    // End of variables declaration//GEN-END:variables
    RecetaOftalmologia receta;

    public void jButton4ActionPerformed(ActionEvent evt) {
    }

    private void setReceta() {
        receta = new RecetaOftalmologia();
        receta.setDistCilOD(txtDistanciaCilOD.getText());
        receta.setDistCilOI(txtDistanciaCilOI.getText());
        receta.setDistDiOD(txtDistanciaDiOD.getText());
        receta.setDistDiOI(txtDistanciaDIOI.getText());
        receta.setDistDnpOD(txtDistanciaDnpOD.getText());
        receta.setDistDnpOI(txtDistanciaDnpOI.getText());
        receta.setDistEjeOD(txtDistanciaEjeOD.getText());
        receta.setDistEjeOI(txtDistanciaEjeOI.getText());
        receta.setDistEsfOD(txtDistanciaEsfOD.getText());
        receta.setDistEsfOI(txtDistanciaEsfOI.getText());
        receta.setDistPrismaOD(txtDistanciaPrismaOD.getText());
        receta.setDistPrismaOI(txtDistanciaPrismaOI.getText());
        receta.setAdicionOD(txtAdicOD.getText());
        receta.setAdicionOI(txtAdicOI.getText());
        receta.setLectCilOD(txtLecturaCilOD.getText());
        receta.setLectCilOI(txtLecturaCilOI.getText());
        receta.setLectDiOD(jTextField32.getText());
        receta.setLectDiOI(jTextField33.getText());
        receta.setLectDnpOD(jTextField31.getText());
        receta.setLectDnpOI(jTextField30.getText());
        receta.setLectEjeOD(txtLecturaEjeOD.getText());
        receta.setLectEjeOI(txtLecturaEjeOI.getText());
        receta.setLectEsfOD(txtLecturaEsfOD.getText());
        receta.setLectEsfOI(txtLecturaEsfOI.getText());
        receta.setLectPrismaOD(jTextField35.getText());
        receta.setLectPrismaOI(jTextField34.getText());
        receta.setFechaReceta(new Date());
    }

    private boolean camposVacios() {
        if (txtDistanciaCilOD.getText().isEmpty() || txtDistanciaCilOI.getText().isEmpty()
                || txtDistanciaDiOD.getText().isEmpty() || txtDistanciaDIOI.getText().isEmpty()
                || txtDistanciaDnpOD.getText().isEmpty() || txtDistanciaDnpOI.getText().isEmpty()
                || txtDistanciaEjeOD.getText().isEmpty() || txtDistanciaEjeOI.getText().isEmpty()
                || txtDistanciaEsfOD.getText().isEmpty() || txtDistanciaEsfOI.getText().isEmpty()
                || txtDistanciaPrismaOD.getText().isEmpty() || txtDistanciaPrismaOI.getText().isEmpty()
                || txtAdicOD.getText().isEmpty() || txtAdicOI.getText().isEmpty()
                || txtLecturaCilOD.getText().isEmpty() || txtLecturaCilOI.getText().isEmpty()
                || jTextField32.getText().isEmpty() || jTextField33.getText().isEmpty()
                || jTextField31.getText().isEmpty() || jTextField30.getText().isEmpty()
                || txtLecturaEjeOD.getText().isEmpty() || txtLecturaEjeOI.getText().isEmpty()
                || txtLecturaEsfOD.getText().isEmpty() || txtLecturaEsfOI.getText().isEmpty()
                || jTextField35.getText().isEmpty() || jTextField34.getText().isEmpty()) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * @return the estadoForm
     */
    public int getEstadoForm() {
        return estadoForm;
    }

    /**
     * @param estadoForm the estadoForm to set
     */
    public void setEstadoForm(int estadoForm) {
        this.estadoForm = estadoForm;
    }
}
